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; ?

cin >> tside; ?

Yup that's right! :)

Yup that's right! :)

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.