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?


Use 'cin' ...

Edit:: e.g: cin >> your_variable; Edit:: e.g: cin >> tside;

cin >> tside; ?

Yup that's right! :)

Yup that's right! :)

Not sure why I put the ? there. It wasn't a question. :)