C++ code ကို run လုပ်ဖို့ compiler လိုပါတယ်။ Compiler ဆိုတာ သင်ရေးထားတဲ့ .cpp source code ကို computer နားလည်နိုင်တဲ့ executable program အဖြစ် ပြောင်းပေးတဲ့ tool ပါ။ Online playground နဲ့ စလေ့လာလို့ရပေမယ့် project တည်ဆောက်ချင်လာရင် local setup ကို သိထားတာ အရေးကြီးပါတယ်။
cpp
# Save your file as hello.cpp
# Compile with g++
g++ hello.cpp -o hello
# Run on macOS/Linux
./hello
# Run on Windows PowerShell
.\hello.exehello.cpp က source file ဖြစ်ပြီး g++ က compiler ပါ။ -o hello က output program နာမည်ကို hello လို့ သတ်မှတ်ပေးတာဖြစ်ပါတယ်။ Compile ပြီးမှ run လုပ်ရတာက C++ ရဲ့ ပုံမှန် flow ပါ။
You should see
If compile succeeds, your program runs and prints the output from your code.Info
Windows မှာ MinGW-w64 သို့မဟုတ် Visual Studio Build Tools, macOS မှာ Xcode Command Line Tools, Linux မှာ g++ package ကို သုံးနိုင်ပါတယ်။