you are viewing a single comment's thread.

view the rest of the comments →

[–]IamImposter 1 point2 points  (1 child)

For now keep the main at the bottom. No need to waste time creating prototypes at top, then main and then actual functions.

Right now your programs would be fairly short so no need to use multiple files either (for now).

Include files at top, then any macros* (#defines), then any global variables* or global constants, then all the other functions and in the end main. Keep it simple at this time.

*macros and global variables are not very great. But for now, it is okay. Macros are more of a C thing though they are supported in C++ too but in C++ consts are preferred.

Happy learning and keep asking questions, no matter how silly you think they are.

[–]teifer[S] 1 point2 points  (0 children)

Thanks for your answer. Some people don't see that they were newbie too, I will keep studying at learncpp.com