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 | 1519 |
| 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.
HPE300: Outdoor Education
Trending!
Updated notes on Outdoor Education
39 Pages
3656 Views
0 Downloads
817.98 KB
EES 300: Mathematics for Economists III
Trending!
Updated notes on Mathematics for Economists III
3735 Views
1 Downloads
837.5 KB
EET 400: MICROECONOMIC THEORY IV
Trending!
This course provides the student with an adequate exposition of the advanced concepts
and techniques of microeconomic analysis
3436 Views
0 Downloads
1.19 MB
AKS402: USHAIRI WA KISWAHILI
Trending!
UPDATED NOTES ON USHAIRI WA KISWAHILI
41 Pages
4954 Views
11 Downloads
563.94 KB
EAE 202: FINANCIAL INSTRUMENTS AND RISK MANAGEMENT
Trending!
UPDATED NOTES ON FINANCIAL INSTRUMENTS AND RISK
MANAGEMENT
73 Pages
3525 Views
0 Downloads
840.62 KB
EFN 302: PHILOSOPHY OF EDUCATION
UPDATED NOTES ON PHILOSOPHY OF EDUCATION
101 Pages
1109 Views
1 Downloads
1.01 MB
EFN 302: PHILOSOPHY OF EDUCATION
UPDATED NOTES ON PHILOSOPHY OF EDUCATION
114 Pages
1447 Views
0 Downloads
1.46 MB
HRIM243: HOSPITAL ADMINISTRATIVE STATISTICS
Trending!
UPDATED NOTES ON HOSPITAL ADMINISTRATIVE STATISTICS
3388 Views
0 Downloads
23.07 KB
HIST 211: SURVEY OF WORLD HISTORY
Trending!
UPDATED NOTES ON SURVEY OF WORLD HISTORY
19 Pages
4227 Views
3 Downloads
614.35 KB