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 | 1581 |
| 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.
Mathematics Notes F1-4
Trending!
UPDATED MATHEMATICS FI-4 NOTES
662 Pages
3785 Views
0 Downloads
9.09 MB
HISTORY NOTES FORM 1-4
Trending!
UPDATED HISTORY NOTES FORM 1-4
528 Pages
2366 Views
2 Downloads
3.84 MB
BUSINESS STUDIES FORM 2
Trending!
UPDATED BUSINESS STUDIES FORM 2
188 Pages
2904 Views
1 Downloads
1.59 MB
BUSINESS STUDIES FORM 3 NOTES
Trending!
UPDATED BUSINESS STUDIES FORM3 NOTES
40 Pages
5176 Views
3 Downloads
694 KB
BUSINESS STUDIES FORM 4 NOTES
Trending!
UPDATED BUSINESS STUDIES FORM4 NOTES
66 Pages
3601 Views
0 Downloads
1.1 MB
BUSINESS STUDIES FORM 1-4 NOTES
Trending!
UPDATED BUSINESS STUDIES FORM1-3 NOTES
325 Pages
4128 Views
2 Downloads
3.28 MB
AGRICULTURE FORM 1 NOTES
Trending!
UPDATED AGRICULTURE FORM 1 NOTES
50 Pages
3607 Views
0 Downloads
1.3 MB