Answers for "main function in c++ program"

C++
2

c++ main function

// Without Arguments
int main() {
  // Body
}

// With Arguments
int main (int argc, char *argv[]) {
  // Body
}
Posted by: Guest on April-12-2022
0

c++ function inside main

auto fac = [] (unsigned int val) {
    return val*42;
};
// With the rise of C++11 a while back, you can now have local functions whose syntax is 
// a little reminiscient of JavaScript:
Posted by: Guest on January-31-2022

Browse Popular Code Answers by Language