+ 2

Why there is a difference between the method off C++ programming in my book and this app?Which on is relevant?

If the starting in this app of a program is #include <iostream> then in my book its #include <stdio.h> and #include<conio.h> and in this app the main function has int written whereas in book its written void, to output a sentence we have to type cout over here and printf there and so on. https://code.sololearn.com/WG0z5fhmxfLp/?ref=app

25th Apr 2017, 11:38 AM
Nikunj Chopra
Nikunj Chopra - avatar
2 Respostas
+ 1
you will find the odd difference in c++ depending on the version. They make changes every now and then. The major revisions were in 2011 and 2014 this is when they introduced new libraries for standard things. One that you will probably come across is <using namespace std> this came in in 2014 prior to this every time you wanted to use cout or cin you had to put std::cout or std::cin. You will find that std::cout still works if you dont use namespace std.
25th Apr 2017, 2:52 PM
Jason Hoffman
Jason Hoffman - avatar
0
Both are relevant. Those are std lib modules I believe.
25th Apr 2017, 11:59 AM
James
James - avatar