Skip to content

Commit

Permalink
return (#984)
Browse files Browse the repository at this point in the history
when generating a new project, `main.cc` will include a `return 0;` at
the end of the `int main()` function

I think it's generally good practice to do so

Co-authored-by: Jeromos Kovacs <[email protected]>
  • Loading branch information
JeromeSchmied and Jeromos Kovacs authored Sep 14, 2024
1 parent 258b3ad commit 1119bff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Cmd/New.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ static constexpr std::string_view MAIN_CC =
"#include <iostream>\n\n"
"int main() {\n"
" std::cout << \"Hello, world!\" << std::endl;\n"
" return 0;\n"
"}\n";

static std::string
Expand Down

0 comments on commit 1119bff

Please sign in to comment.