C++ သည် Bjarne Stroustrup ဖန်တီးခဲ့သော general-purpose programming language ဖြစ်ပြီး C language ရဲ့ မြန်ဆန်မှုကို class, object, inheritance လို object-oriented feature တွေနဲ့ ပေါင်းစပ်ထားပါတယ်။ မြန်နှုန်း၊ memory control၊ hardware နီးနီးကပ်ကပ်အလုပ်လုပ်နိုင်မှုတွေကြောင့် operating system, game engine, browser, trading system, robotics နဲ့ performance-heavy software တွေမှာ အသုံးများပါတယ်။
#include <iostream>
int main() {
std::cout << "Hello from C++!";
return 0;
}ဒီ code မှာ #include <iostream> က output ထုတ်ဖို့ library ကို ခေါ်ထားတာပါ။ main() က program စတင် run မယ့်နေရာဖြစ်ပြီး std::cout က console ထဲကို စာသားထုတ်ပေးပါတယ်။ return 0; က program အောင်မြင်စွာပြီးဆုံးကြောင်း operating system ကို ပြန်ပြောတာပါ။
Hello from C++!Info
C++ statement အများစုက semicolon ; နဲ့ အဆုံးသတ်ရပါတယ်။ မေ့သွားရင် compile error တက်တာ C++ ရဲ့ classic welcome party ပါ။