Hello World in C++

C++ (pronounced "See plus plus") is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell Labs as an enhancement to the C programming language and originally named "C with Classes". It was renamed C++ in 1983

G++ Installation

It's possible to install the GNU GCC on-board and use the board itself to compile natively your applications instead of a cross compiler on an external PC. To do that type:

~# apt-get update
~# apt-get install g++

Compile and run

Now try if the compiler works using an "Hello world !" source code example:

#include "iostream"
using namespace std;
int main(int argc, char *argv[]) {
    cout << "Hello world !" << endl;
    return 0;

Save this code on your board in a file called hello.cc then compile it by typing:

debarm:~# g++ hello.cc -o hello

at the end run it by typing:

debarm:~# ./hello
Hello world !

Related links