Answer the question
In order to leave comments, you need to log in
Is it possible to determine the line number in C++?
So let's say I have the following code:
cout << "Your text" << endl;
cin >> textUser;
if (textUser != "Hello")
cout << "ERROR";
cout << "Your text" << endl;
cin >> textUser;
if (textUser != "Hello")
cout << "ERROR [0005]";
cout << "Print hello";
cout << "Your text: " << endl;
cin >> textUser;
if (textUser != "Hello")
cout << "ERROR [0005]"; // ?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question