+ 3
Surely will you know why if you continue learning. In C++ (and most other programing languages), texts with double brackets are STRING CONSTANTS, and can be passed to string variables. For example: string hello="hello"; Here [hello] is a variable name which cannot contain a bracket while ["hello"] is a string constant. Both cout<<"hello"<<endl; and cout<<hello<<endl; are displaying the value of the corresponding symbol.
7th Jul 2021, 7:20 AM
Elvish
Elvish - avatar