urgent help needed!!!
I'm trying to pull this next code and for some reason, a reason i can't understand, the bold line marked in red is being ignored by the compiler. It just skips it and continue to the next line:
in the end of the function both "trans" and "use" are initialized while "word" is not.
string word, trans, use;
cin >> choose;
cout << "Please enter word: " << endl;;
getline (cin, word, '\n');
cout << "Please enter translation: " << endl;
getline (cin, trans, '\n');
cout << "Please enter a use of the word in a sentence: " << endl;
getline (cin, use, '\n');
cout << "Please choose commonness scale: " << endl;
cin >> index;
newData = new Data (word, trans, use, index);
You have a double ;; at the end of the first line!
I more than agree but unfortunately that doesn't seem to solve the problem...
The exact same problem was last dealt with here (see my last post).
It should also be in a FAQ because it is a very common pitfall.
Actually, it kind of already is: http://faq.cprogramming.com/cgi-bin/...&id=1043284392
Originally Posted by anon