- 1
Pls someone should help with if i want declare a variable that is not a number. i.e a words.
7 Réponses
+ 3
abdulsamad adamu , here is a sample with int, string and char. char is only suited for a single character, not for words.
include <iostream>
using namespace std;
int main() {
int number;
string name;
char letter;
cin >> number;
cin >> name;
cin >> letter;
cout << number << endl;
cout << name << endl;
cout << letter << endl;
return 0;
}
+ 1
give some more info. what language is it? do you have an example problem?
0
It's English language.
I want declared a word cloudy as a variable I used "char" is showing errors
0
sorry i meant coding language. python, c, java, what are you using?
0
C++
0
you should edit the post tags to include that. i dont know c++ so i cant help sorry!
0
Thanks you very much