+ 3
how to use char as variable and print name instead of numbers ?
like in basic variable program we declare a = 10 and 10 is printed, so how can I replace integer with char like a = hi and hi gets printed
3 Answers
+ 8
@Rushikesh,
You can use string in place of int for such cases, for example:
string a = "Hi";
cout << a;
Is that what you meant? sorry if I misunderstood your question, tell a little more about it if I was wrong : )
+ 5
like in basic variable program we declare a = 10 and 10 is printed, so how can I replace integer with char like a = hi and hi gets printed