0
Shouldn't this work?
4 Respuestas
+ 6
You must specify array size if you're going to put values after you declare it.
+ 6
Because char is one letter
You can use one of these codes to print more letters but 'cin' stops after space so 'ab ab' prints 'ab'
Check this if you want spaces in your input too
https://stackoverflow.com/q/5838711/9132046
void myfunc(){
char str[100];
cin >> str;
cout << str;
}
void myfunc(){
string str;
cin >> str;
cout << str;
}
0
Even if i do that i just get the first letter
0
K thanks