getch() waits for a keypress i think , You could also just run your program in the command prompt. Start-> Run -> Command and then execute your program with that. When running the executable strait...
Type: Posts; User: D-Man
getch() waits for a keypress i think , You could also just run your program in the command prompt. Start-> Run -> Command and then execute your program with that. When running the executable strait...
Im assuming you have windows. For windows you can't really go wrong with visual c++. Other wise i use Borland which isnt bad either. I *THINK* borland has a free trial or something like it. So you...
No Problem :D
www.gametutorials.com HAS THE BEST ONES!!!
I probley just mis interprited what he had said. Live and learn.
That only initializes the first char in the array, at least thats what my instructor has told me. If im wrong i appologize.
I agree with setting a value to the array initially but how you did it doesnt work
char array[1] = { 0 };
would be fine, but the rest of those 59 values in
when you want to end a loop use
break;
also doing
char filename[50] isnt such a good idea. A better way would be to
Best site ive seen on C++ or C is www.gametutorials.com . The people that make the tutorials there are great. Try that out if you have visual c++.
FracAns = Fn*Sn / Fd*Sd ;
PercAns = FracAns / 100;
he is infact trying to divide the fractions... the reason I put
if ((Fd*Fn*Sn*Sd) == 0)
Was to check if any of the numbers are equal to...
apstring.find(letter);
Hes not adding fractions hes dividing them. 1/4 divided by 0/4 is what? If you were adding then you would have to do
if((Fd*Sd) == 0)
but that wasnt the case.
Apstring is for beginners, i like string better but whatever. Here is the ones i used from before. If your using Borland just do what you did before except put these files into your include...
int Fn ,Fd, Sn, Sd;
int FracAns=0;
float PercAns =0;
cout<<"enter the numerator and the denomenator for the first fraction"<<endl;
cin>>Fn;
cin>>Fd;
cout<<"Enter the numerator and the...