0
Does anyone know how to declare a variable that isn't a number in C++?
I'm trying to declare a variable but don't know what to do. I only know int variables, but that's only for numbers. I also want to know how to make it work with the cin command.
4 Answers
0
string name = "Fred";
https://code.sololearn.com/cw5es50Nsj1V/?ref=app
+ 7
Try getline
https://code.sololearn.com/cp32oQ9205NP/?ref=app
+ 5
There are also many other different data types (int, float, char, string...).
In the 3 module of cpp talk about them.
+ 2
Recheck my code âș
https://code.sololearn.com/cw5es50Nsj1V/?ref=app