Answer the question
In order to leave comments, you need to log in
Why are different quotes treated differently?
In python, I'm used to always writing print('Hello, world')
, not print("Hello, world")
.
In C++, if I write std::cout << 'Hello, world';
, then visual studio underlines and gives a warning.
And if you write std::cout << "Hello, world";
, then everything compiles without comment.
In general, the essence of the issue.
Is it possible to use single quotes (apostrophes) in c++?
If so, is there any way to disable the warning in visual studio?
Answer the question
In order to leave comments, you need to log in
In c++/c#, quotes ' '
are used for the char data type and can hold 1 character, while quotes
" "
are of type string , that is, an array of characters and can span multiple characters.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question