Riffe
2008-12-27 08:25:14
Learning C++
HELLO.cpp - Your first C++ program
In the traditional programming books they start with the word Hello World ( or anything similar ) writes on the screen. We are in this old tradition on.
Write your first direct in the editor, exactly as below. When you controll that it is right register save the file, compile, links and start it. Order Hello World is going to write on the screen. Don't worry about how it works, it was just an exemple so you can known you with development. We will go through the program carefully coming days. Line a List 1.1, enter as:
List 1.1. HELLO.cpp, the program Hello World.

Be sure to enter it exactly as it appears. Be particularly careful with spaces and special characters. On line 5 is << which consists of two <characters, which sits at the bottom left of most keyboards. Row 5 ends with a semicolon, do not forget to write it!

When you run the program HELLO.exe to be Hello World! written on the screen. In that case, congratulations! You just compile and run your first C++ program. It may not look much out of the world, but almost all professional-C++ programmers started with this program.
EDIT: You can't do this on Scar, you need a C++ compiler!
HELLO.cpp - Your first C++ program
In the traditional programming books they start with the word Hello World ( or anything similar ) writes on the screen. We are in this old tradition on.
Write your first direct in the editor, exactly as below. When you controll that it is right register save the file, compile, links and start it. Order Hello World is going to write on the screen. Don't worry about how it works, it was just an exemple so you can known you with development. We will go through the program carefully coming days. Line a List 1.1, enter as:
#include <iostream.h>
List 1.1. HELLO.cpp, the program Hello World.

Be sure to enter it exactly as it appears. Be particularly careful with spaces and special characters. On line 5 is << which consists of two <characters, which sits at the bottom left of most keyboards. Row 5 ends with a semicolon, do not forget to write it!

When you run the program HELLO.exe to be Hello World! written on the screen. In that case, congratulations! You just compile and run your first C++ program. It may not look much out of the world, but almost all professional-C++ programmers started with this program.
EDIT: You can't do this on Scar, you need a C++ compiler!