#what is special about main() and how is it different from other functions (im new to cpp)
10 messages · Page 1 of 1 (latest)
الدالة main() هي النقطة البداية لبرامج C++ وتُستدعى أولاً. يمكنها إرجاع قيمة للتحكم في نجاح أو فشل البرنامج، ويمكنها أيضًا استقبال معاملات من خط الأوامر. تختلف في صيغتها عن الدوال الأخرى وتستخدم للتحكم في تنفيذ البرنامج والتفاعل مع البيئة الخارجية.
the starting point for any cpp program is always function with following signature:
int main();
or, alternatively if you want to take in command line arguments
int main(int argc, char** argv);
is ** a pointer referring to another pointer?
char** is an address that points to multiple char*
char* is an address that points to multiple char
the number of char* is provided in argc
the number of char in a char* can be fetched by reading for the /0 (null terminator character)
look up “pointer arrays” on google
yeah, because strings in c are represented as a pointer to char