Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

problems with char conditions and printing to console

$
0
0
Is there something special about the variable type 'char' that I am ignorant of?

char servCode;
	cout << "Enter service code (r or p): " << endl;
	cin >> servCode;

	cout >> servCode;
	while(servCode != "r" && servCode != "R")
	{

	}


Visual studio has issues with the pointers in

cout >> servCode;


it also has issues with the != operands in my while loop.

Thanks in advance.

Viewing all articles
Browse latest Browse all 51036

Trending Articles