- Intro
- Basics
- Compiling your first program
- Structure of a program
- Comments
- A first look at variables (and cin)
- A few common C++ problems
- A first look at operators
- A first look at functions
- Whitespace and basic formatting
- Forward declarations
- Header files
- Programs with multiple files
- A first look at the preprocessor
- Variables
- IDE
- Operators
- Variable
- Control Flow
- Array
- Functions
- OOPS
- Overloading
- Composition
- Inheritance
- Programs
<!--[if gte mso 9]>
Jatinder
Normal
Jatinder
2
32
2013-02-18T14:14:00Z
2013-02-18T14:14:00Z
2
182
1039
8
2
1219
12.00
<![endif]
-->
In every programming language there are
various statements which are known as tokens in C++. Using these tokens C++
programs are written .There are following things which will be present in every
C++ Program:-
·
Header Files
· Functions
·
Statements and Expressions
Header Files:-These are the pre written C++ Programs which
will help you to write your C++ Program.
Functions:-These are the group of statements which are
written in between curly braces {} with
a specific name for specific task. We will Explain the
functions in details in upcoming post.
Statements and expressions:- The statements
are written in program to do some specific task ,when we combines them these
become expressions(Like maths
expressions).
Here is a
example of C++ Program:-
#include <iostream>
int main()
{
using namespace
std;
cout << "Hello world!" << endl;
return 0;
}
Header Files:- In
this program #include <iostream> is a header file.
Function:-In
this program is a int main()function .It has statements for a specific
task.
Statements and expressions:-The code written in between {} is the
statements and Expressions.The statements are here:-
using namespace std;
cout << "Hello world!" << endl;
return 0;
Subscribe to:
Post Comments (Atom)
0 comments: