49,761 Topics
| |
In our class we have usually been just programming with the command prompt, no visual stuff. but now, in what my teacher calls "making pretty pictures" we're supposed to make a graph. The only this is, i have no idea how to make actual pictures or colors come out. I … | |
I was viewing the practice problem section and decided to give a go at them, anyways, this is my Palindrome dector code. Could someone just take a look at it and explain to me if there is a better way to execute this problem? - michael [ICODE]// Palindrome check by … | |
Hi again, first; i realise this peace of code is stupid, it has been taken out of context, altered for the sake of simplicity etc. I wonder if the problem is the quite large number stored in int to (changed to unsigned long int) i have read on cplusplus.com that … | |
Hi i have written a standard library function 'strcat' on my own, even though the output seems ok, can someone please verify if what i'm doing is right? i get confused using pointers. [code] void mystrcat(char *a,char *b) { while (*a++ != '\0'); *a--; while (*a++ = *b++); } [/code] … | |
Hi, I have this code for an array: [code] { cout << "how many tins sold? " << (i+1) ; cin >> tinssold; cout << "how much is each tin?" << (i+1) ; cin >> tinprice; value=(tinssold*tinprice cout <<"total value of tins is " <<value; } [/code] IF I WANTED … | |
excuse me, i want to make explosion in c++. n i got trouble.. i really dont know the psudocode after i try to make it in paper a whole day. anybody can help me? i will specially give a thank you if can give me the real program of explosion … | |
THIS IS WHAT I HAVE DONE SO FAR (QUESTION BELOW IT) [CODE]class Customer { public: int noOfCalls; String custName; virtual Compute_Bill(); }; //define function, contructors etc by Customer::Customer() etc class Premium_Customer: public Customer { //premium specific function that inhereit from customer }; [/CODE] HERE IS THE QUESTION I need help … | |
So basically, I'm creating a switch statement that if the user enters a p or if they enter a P it will still work, any ideas? Thank you | |
Basically what I am trying to do is get the width and height of the doors in a room. The user enters the number of doors in the room, it then goes into a for loop which then asks for the width and height of each wall. The problem is … | |
i am doing the 'getting started' tutorial that comes with the dark gdk, and i ran into this error: c:\documents and settings\tom\my documents\visual studio 2008\projects\hello world\hello world\main.cpp(6) : error C2065: '“animatedsprite' : undeclared identifier heres my code(that i copied from the pdf): [code=c++] #include "DarkGDK.h" void DarkGDK ( void ){ … | |
Hello guys, I ve been searching for a long time for an algorithm (in c++) that would take the number of digits and give all the possible combinations between 0 and 1. For example for number of digits 3 will give 100 010 001 110 101 011 111 The funny … | |
Ok i have a few questions. I'm fairly new to programming. Im starting to get a little functional with java, i can handle GUI's, threads, exceptions, 2d graphics, JDBC etc. I took a class in C++ only to find that I am not even close to producing graphics or GUI's … | |
I just want to ask something about using a stack in maze Im confused about implementing stack in c++.is it possible that I can insert a multidimensional array in a stack,how?:S (can you please give me some little bit of codes in order to do that) I did already a … | |
Hi, i have few programs which i have compiled using "make all". When i debug the main program, during debugging i get the following message : ****Stepping over inlined function code.*** As a result i am unable to debug the program line by line. The debugging is random. I am … | |
i need a random generator. it should be able to generate serial #s along side. any website in mind? please help.:yawn: | |
Hi all... Basically I'm wondering how I complete a loop based on the number of times a user requests it. For instance, I'm doing an employee system that works out pay based on hours. There are lots of rules/criteria about what they pay is recieved based on the input hours. … | |
I'm writing a class planner, where the user is given the opportunity to enter certain information about their classes and have it printed back to them upon request. The problem I'm having is that whenever I enter any text into the input with a space in it, it returns me … | |
I really wonder whether the diff command can be implemented in c++.. But i need the code for tht..anyone please help... Sirisha. | |
hey, im trying to use the mpg123 library to extract the sound data from the mp3 file.... ive used this example to decode the file: [url]http://mpg123.de/api/mpg123__to__wav_8c-source.shtml[/url] i can extract the info about the file but the actual sound data im having troubles.... because it doenst give me the whole data … | |
How can I play sounds under windows? I know about PlaySound() but I want to load the sound by myself, then play. | |
Hi, I am using this code: int total = 0; for (i = 0; i < 3; i++) { total+=hours_run[i]; cout <<"\n"<<total; } The aim of this code is too add up the hours run by the 3 people who enter the values. The code above produces some weird results. … | |
Hi, I am pasting here code for finding path using Dijkstra algorithm. [icode] #include <stdio.h> #include <limits.h> #include <assert.h> typedef enum {false, true} bool; /* The order is rather important to get the boolean values right. */ typedef char *string; #define oo UINT_MAX /* infinity is represented as the maximum … | |
Hi. I was just wondering what you thought about C++ and windows development. I'll post a pie chart daily as long as people continue to respond. The Question: What do you think about C++ and windows development.? A - You should only learn C++ B- You should only learn Windows … | |
Hi. I'm beginning to wonder if youre dreading my posts - they are so dumb but.... Is there a way in Microsoft Visual C++ Express Edition to compile the program and save it as a [b].exe[/B] file? Thanks! | |
Hi, I am getting the following error while compiling: "Undefined symbols: "main_class::binary(int, std::vector<int, std::allocator<int> >&, int)", referenced from: main_class::identity(int, int, int)in test_sat.o ld: symbol(s) not found collect2: ld returned 1 exit status make: *** [test] Error 1" Following is the code : [ICODE]int main_class::identity(int rowno, int size_row, int loop_iterate) { … | |
Hello dear all. i need a help where i'm try to calculate execution time for my program. seem i have a problem with how to set it up. [code=cplusplus] #include <iostream> #include <time.h> #include <sys/timeb.h> typedef int tRow[10]; int N, i; int x[100], xi[100]; /* The permutation and its inverse … | |
[QUOTE=ArkM;657823]You are welcome![/QUOTE] Simulation of an Airport Runway An airport is developing a computer simulation of air-traffic control, which handles events such as landings and take-offs. It is a small busy airport with only one runway. In each unit of time one plane can land or one plane can take … | |
i want to create a document using apache xml parser, can you guys provide me with sample code? After creating the document in the memory, i want to save it as an xml file. | |
Hi! I want to write a program, which calculates and draws the path of a planet around a sun. Actually it just draws the planet and the sun (and the velocity and the gravity force vectors). The sun is still, it doesn't move, just the planet is moving. The planet … | |
Hi. I take a c++ class in school and we use Borland 5 as our compiler. At home, i have windows visual studio 9.0 installed. We normally just make programs that run inside the command prompt, but we are beginning work on doing things visually. My question is, whats the … |
The End.