INTRODUCTION TO C++ PROGRAMMING YEAR 1
| Institution | UNIVERSITY |
| Course | BACHELOR OF SCIENCE... |
| Year | 1st Year |
| Semester | Unknown |
| Posted By | stephen oyake rabilo |
| File Type | |
| Pages | 33 Pages |
| File Size | 207.62 KB |
| Views | 1584 |
| Downloads | 0 |
| Price: |
Buy Now
|
Description
First Class In C++
Adapted from : http://www.cplusplus.com/doc/tutorial/tut1-1.html
Structure of a C++ program
Probably the best way to start learning a programming language is with a program. So here is our
first program:
// my first program in C++
#include <iostream.h>
int main ()
{
cout << "Hello World!";
return 0;
}
Hello World!
The left side shows the source code for our first program, which we can name, for example,
hiworld.cpp. The right side shows the result of the program once compiled and executed. The way to
edit and compile a program depends on the compiler you are using. Depending on whether it has a
Development Interface or not and on its version. Consult section compilers and the manual or help
included with your compiler if you have doubts on how to compile a C++ console program.
The previous program is the first program that most programming apprentices write, and its result is
the printing on screen of the "Hello World!" sentence. It is one of the simpler programs that can be
written in C++, but it already includes the basic components that every C++ program has. We are
going to take a look at them one by one:
Below is the document preview.
AGRICULTURE FORM 2 NOTES
Trending!
UPDATED AGRICULTURE FORM 2 NOTES
104 Pages
2963 Views
0 Downloads
1.43 MB
AGRICULTURE FORM 4 NOTES
Trending!
UPDATED AGRICULTURE FORM 4 NOTES
140 Pages
2905 Views
0 Downloads
1 MB
PHYSICS NOTES FORM 1-4
Trending!
UPDATED PHYSICS NOTES FORM 1-4
268 Pages
4518 Views
2 Downloads
7.91 MB
PHYSICS SCHEMES OF WORK FORM 1
UPDATED FORM1 SCHEMES OF WORK
18 Pages
589 Views
0 Downloads
743.2 KB
Physics Scheme Form2
Trending!
UPDATED PHYSICS SCHEMES OF WORK
21 Pages
3119 Views
0 Downloads
765.5 KB
Physics Scheme Form3
Trending!
UPDATED PHYSICS SCHEMES OF WORK F3
25 Pages
3456 Views
0 Downloads
811.89 KB
Physics Scheme Form4
Trending!
UPDATED PHYSICS SCHEMES OF WORK F4
22 Pages
2936 Views
0 Downloads
811.55 KB
HOW TO START A BUTCHERY BUSINESS IN KENYA
Trending!
A Market Survey of the Butchery Business.
30 Pages
3278 Views
0 Downloads
991.29 KB