C++

int main()

Në shqip: Funksioni main në C++

ShpjegimiSQ

Çdo program C++ fillon te funksioni int main(). Kompjuteri e ekzekuton kodin brenda tij nga lart poshtë, dhe return 0; në fund i thotë sistemit që programi mbaroi pa probleme.

EnglishEN

Every C++ program starts at the int main() function. The computer runs the code inside it from top to bottom, and return 0; at the end tells the system the program finished without problems.

Si ta mendosh

Si dera kryesore e shkollës: ka shumë dhoma, por të gjithë hyjnë nga aty.

Lexoje në anglisht

Like the school's main entrance: there are lots of rooms, but everyone comes in through there.

Shembull kodicpp

#include <iostream>
int main() {
    std::cout << "Programi im i parë!\n";
    return 0;   // 0 = gjithçka në rregull
}

Terma të lidhur