I have a program written in C that I would like to convert to C++
but the scanf command is not accepted by C++
Is that normal???? what is scanf equivalant to in c++?
I have a program written in C that I would like to convert to C++
but the scanf command is not accepted by C++
Is that normal???? what is scanf equivalant to in c++?
scanf("%type",&variable);
cin >> variable;//type auto detected
Thanks
Pratik
you can write a program that will change it for you, it would take about an hour, and come in handy if you ever need to do it again.
That is not normal, I think. C++ is supposed to be near fully backwards compatible.but the scanf command is not accepted by C++
Is that normal???? what is scanf equivalant to in c++?
Turn no more aside and brood
Upon love's bitter mysteries
For Fergus rules the brazen cars...
>> but the scanf command is not accepted by C++
I suppose it could be a lack of #include <stdio.h>
thank you all I think I did not include stdio.h.........for now I will try using the cin command