I am making a program for school, and I CANNOT figure out my compile errors. I don't want you guys to have to write the program for me, but could you please try to help me compile the code? Thanks in advance, everyone.
I read on this site somewhere that to see what you learned after taking some tutorials on the basics of C++ was to look at other peoples code...that being said I don't know how much help I can be considering I am a beginner and someone can please correct me if I am wrong...but I see a couple issue with variables that you haven't defined/declared. One being "i" as you used it in
for (i=0; i < value.size(); i++){
if (isalpha(value.at(i))){
if (value.at(i) = "A" ||
value.at(i) = "a" ||
value.at(i) = "E" ||
value.at(i) = "e" ||
value.at(i) = "I" ||
value.at(i) = "i" ||
value.at(i) = "O" ||
value.at(i) = "o" ||
value.at(i) = "U" ||
value.at(i) = "u"){
vCount++;
} else {
cCount++;
}
}
}
But it doesn't have a type assigned to it (ie. int, char, float) Also I don't know what compiler you are using but the variable first you are using looks wrong and this might be my compiler talking (Code::Blocks) because I tried defining a variable like that once b4 and it errored on me.
Also the varible vowel and con don't look to be defined either. Don't know if that helps you at all =/
The teacher is having me send the code to a website to compile. It doesn't return a specific error line or anything, it simply tells me that it didn't compile. Any other thoughts? I actually contacted him and he said to keep searching and I can meet him tomorrow if no one could help, but I'd have a penalty for a late assignment.
Thanks for pointing out some errors for me. I'm much more used to object oriented stuff, and c++ is pretty foreign to me.
That did it! The program itself has some flaws, but I can debug them much easier now. Thank you very much for the help, everyone. I can see now that I need to be more careful about = and ==, as well as " and '.
If you have any last minute pointers on any other stupid beginners error that I may be overlooking, I'd appreciate it. Thanks again.