Hey everyone!
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.Code:string word, trans, use; int index; cin >> choose; switch (choose) { case (1): { 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); list.insert (*newData); break; }
help anyone...



LinkBack URL
About LinkBacks



