IGOS Nusantara dan C Plus Plus: Perbedaan revisi
Dari IGNwiki
(←Membuat halaman berisi ' == Pasang == Lakukan # yum -y install gcc-c++ == Contoh Program == Simpan di /home/igos/cpp/coba.cpp #include <iostream> int main() { std::cout << "Hello...') |
|||
Baris 15: | Baris 15: | ||
return 0; | return 0; | ||
} | } | ||
− | |||
== Kompilasi coba.cpp == | == Kompilasi coba.cpp == | ||
+ | $ g++ coba.cpp -o hasil | ||
+ | |||
+ | == Jalankan == | ||
+ | $ ./hasil | ||
+ | Hello world! |
Revisi per 27 Agustus 2014 01.15
Daftar isi
Pasang
Lakukan
# yum -y install gcc-c++
Contoh Program
Simpan di /home/igos/cpp/coba.cpp
#include <iostream> int main() { std::cout << "Hello World!" << std::endl; return 0; }
Kompilasi coba.cpp
$ g++ coba.cpp -o hasil
Jalankan
$ ./hasil Hello world!