Comments

Sep 23, 2013 at 3:12am
I was playing with some code and I tried to comment out some cin >> and it doesn't comment it out. Wondering if there is an easier way to ignore the code. Tried single line // comment too. Using Visual Studio Express 2012.

1
2
3
4
 /*cout << "Enter First Name: "; cin >> first_name;
 cout << "Enter Last Name: "; cin >> last_name;
 cout << "Enter Age: "; cin >> age;	
 cout << endl << "Enter the name of the file: "; cin >> file_name;*/
Sep 23, 2013 at 3:20am
It looks commented to me. Are you sure you re-compiled/re-built everything before running it? Try giving us a full program that doesn't work.
Sep 24, 2013 at 1:56am
Yeah, it looks right here but in Visual Studio express 2012, only the " " changes green. Everything else is still the normal, non-commented colors. And it'll run the cin's still. It's probably something with Visual Studio.
Topic archived. No new replies allowed.