+ 1

What should use to feed variable to program by user?

aa if we want to feed 1 we proceed as int a; cin >> a; cout << a ; after running program if we type any integer then it will show as same output... and now I want to input a variable say 'j' then what should I use..... or what should I use in place of cin to get desired output..

16th Oct 2016, 7:19 AM
Jay Patil
Jay Patil - avatar
3 odpowiedzi
+ 1
j is not an integer but a string, you need to declare variable string and include #include <string> in the header
16th Oct 2016, 9:54 AM
Milan Novotny
Milan Novotny - avatar
0
plz answer
16th Oct 2016, 8:01 AM
Jay Patil
Jay Patil - avatar
0
thanx
16th Oct 2016, 12:32 PM
Jay Patil
Jay Patil - avatar