Trying to get program to compile I keep recieving the following error:" ISO C++ forbids comparision between pointer and integer"
Any help is appreciated
Alpha22
Code:int enterAmts (float Ca[]) { int i = 0; int idx = 0; int count = 0; char cont; string namefile; string catName; float catAmts; float numcat = 0; infile.open(namefile.c_str()); infile >> catName[idx]; while(!infile.eof()){ infile >> catName[idx]; numcat ++; } while(i < 10 && catName [idx]!= "zzz"){ //problem area cout << "Enter amt for " << catName[i] << "$" << flush; runResults << "Enter amt for " << catName[i] << "$" << endl; cin >> catAmts[i]; runResults << catAmts[i] << endl; count += i; i++; }//endwhile infile.close(); // outfile.close(); return 0; }//endmain



LinkBack URL
About LinkBacks


