'Single-Quotes' and "Double-Quotes" ...?
Posted: Wed Sep 08, 2004 11:40 am
hi, i am new to this board and to the judge, but i'm also interested for solving some problems.
so, i have a question about 'Single-Quotes' and "Double-Quotes" in C++..
what is the difference between 'Single-Quotes' and "Double-Quotes" ...?
if my code looks like this:
...i get an ErrorMessage like this while compiling: "cannot compare char-pointer with constant string"
then i use the 'Single-Qutes' instead so that the one line looks like this:
...and there is no problem.
what is the exactly difference between 'Single-Quotes' and "Double-Quotes" ...?
Bender
so, i have a question about 'Single-Quotes' and "Double-Quotes" in C++..
what is the difference between 'Single-Quotes' and "Double-Quotes" ...?
if my code looks like this:
Code: Select all
char c;
... // c is an character, for example 'a'
if(c == "\n")
{ ...
then i use the 'Single-Qutes' instead so that the one line looks like this:
Code: Select all
if(c == '\n')
what is the exactly difference between 'Single-Quotes' and "Double-Quotes" ...?
Bender