Hi
I believe "\" signals that the next character is to be interpreted differently than how it's normally dealt with. Can "\" only be used to signal the alternative interpretation of a signal character at a time? You see, in the code below, the statement in red gives rise to problem. Please help me with it. Thanks.
Code:#include <iostream> #include <cstdlib> using namespace std; int main() { cout << "Nancy said, \"This is backslash t, \t, OK\"" << endl; cout << "Nancy said, \"This is backslash t, \\t, OK\"" << endl; cout << "feet" << "\'-" << "inches" << "\"" << endl; cout << "feet" << '\'' << "-" << "inches" << '\"' << endl; cout << "feet" << '\'-' << "inches" << '\"' << endl; //problem system("pause;"); return 0; }




Reply With Quote