Going through one of my old .c file I have a line as follows:
scanf("%i", &tside);
I would like to convert it c++ code.
Can someone show me how to do that?
Sincerely,
greg022549
Going through one of my old .c file I have a line as follows:
scanf("%i", &tside);
I would like to convert it c++ code.
Can someone show me how to do that?
Sincerely,
greg022549
Use 'cin' ...
Edit:: e.g: cin >> your_variable;
Edit:: e.g: cin >> tside;
cin >> tside;
?
It is a input statement from the standard input device(the keyboard).
the Equivalent c++ code could be:
std::cin>>tside;
Or if you want a converter which shall convert C to C++ check this http://www.scriptol.com/scripts/ctocpp.php even this http://www.softforall.com/SoftwareDev/ToolsEditors/C_to_C___Converter08110221.htm
cin >> tside;
?
Yup that's right! :)
Yup that's right! :)
Not sure why I put the ? there. It wasn't a question. :)
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.