Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No int causing compiling issue #3

Closed
hwangs12 opened this issue May 30, 2023 · 3 comments
Closed

No int causing compiling issue #3

hwangs12 opened this issue May 30, 2023 · 3 comments

Comments

@hwangs12
Copy link

Hi @tridibsamanta, thanks for writing this repo.
I cloned your repo to learn CPP but they don't start with int main but just main.
Is this how new compilers accept CPP code these days or is this a typo?
Would appreciate your clarification
Regards,

MichaeINeumann pushed a commit to MichaeINeumann/CPP_Beginner_to_Expert that referenced this issue Aug 12, 2023
add return value for main function.
add return 0 for normal exit.
@MichaeINeumann
Copy link

Hi hwangs12, I think you are right.
I learned that all C++ programs must have a main function that returns an int value.
Return 0 to execute the program normally.

I added that and created a PR.

@swarupsahu08
Copy link

Hello @hwangs12 You are correct that the programs are not executable as there is no int main() in the code base and needs to return 0 at last to run the program smoothly and can you assign me this issue so that I can make the relevant changes to the code

@hwangs12
Copy link
Author

@MichaeINeumann @swarupsahu08 I approved Michael's PR. I will close the issue. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants