+ 1

Which kind of error will occur when, we use C-language command on C++?

Like printf() in place of cout<<; scanf() in place of cin<<.

13th Aug 2017, 9:57 PM
Avatar
Avatar - avatar
3 odpowiedzi
+ 2
You can use the C standard functions in C++ so long as you include the right headers. Otherwise you'll get a compilation error
13th Aug 2017, 10:38 PM
aklex
aklex - avatar
+ 1
Here is an example of C code inside C++ https://code.sololearn.com/c8BaPFZ1bjhx/?ref=app
13th Aug 2017, 10:41 PM
Manual
Manual - avatar
0
C standard functions yes, but you can run into errors when trying to write C in C++ because of some incompatibilities. An obvious one is that C++ has more reserved keywords. If you like reading: http://david.tribble.com/text/cdiffs.htm
13th Aug 2017, 10:43 PM
Dennis
Dennis - avatar