hi, I'm a beginner in c++ so i apologize for my dumb questions
-what is the difference between continue; and break; in a loop
-what does cin.get do
-what does int main (void) mean
-in strings what does cctype and cstring do
-what does strcat do
-what does get line do
-what does if (x=='\n') mean
-what does while (x==" ") mean
These questions aren't dumb, they are an essential part of becoming a good programmer.
-Continue sends program flow back to the beginning of a loop, while break ends the loop.
-cin.get is similar to cin, but it ignores spaces. Meaning you can input multiple words.
-int main is the thing you compiler looks for when it compiles. Everything in int main will be executed first.
-Since I'm rather a beginner too (been coding for about 8 months) I don't know what cctype is. but the command c_str() converts a string into a c std string, meaning you can use it for things such as using a variable to declare an fstream
-I don't know
-getline acts similar to cin.get. It ignores spaces.
-it means if the variable x is equal to a new line
-it mean while variable x is equal to space
i just wanna add to what paulthepenguin said. cctype is also a c std string. e.g instead of using
[if (x=='a' || x == 'A') {
cout << x << endl;......}][//if x equal to uppercase 'A' or lower case 'a'//]
but u will just input
[char x;
cin >> x;
x = tolower(x)][/cctype is the std library for tolower//]
wow am flattered am also a newbie like you. but i achieved reading alot from this forum. i dont have any teacher but just a friend from this forum. if you have any problem, just post it here and b4 you knew it, your problem is solve. or you can inbox me.....:) and thanks to you all..... you are really a wonderful people
BEST REGARD