0
Header files and c++ is totally different and it seems difficult
in every book header file is taught in this way #include<stdio.h> #include<conio.h> void main( ) where as in this app they taught in another way ,I'm not getting that and it seems me difficult as I'm used to normal method given in books https://code.sololearn.com/cR1xHnH51MF8/?ref=app
6 ответов
+ 10
The syntax is almost identical.
#include <iostream>
// This line is a header file, the .h was dropped as this particular file is a part of the standard
using namespace std;
// this line tells the compiler we are using methods that belong to the standard namespace
int main()
// this line is the main function declaration, we give it a return type of integer as the standard requires us to return a value to the program that called our program (usually the operating system)
{
return 0;
// this line is used to end the program, it gives the return integer value to main() , 0 signifies normal program termination.
}
This is all contained in the course here, if you continue the course, all should become clear.
+ 8
When was the book printed? I had similar issues of learning from out dated material
Anything prior to 1998 will probably just lead to confusion and is best avoided
+ 2
my confusion is about the syntax they are using in app it's too complicated where as in books the syntax or header file is given in simple way as i have written above
+ 1
ohh srry my misunderstanding