Mikebits
Well-Known Member
This is not a how to, rather a request. I look at some people code and it looks so organized and nice, where my code works, but is a total disarray. I tend to put most of my code in the main, guess I should use more functions and such. Would someone mind posting an example of how code should be organized and look, and maybe show some things not to do. Some things I wonder, where do you place your functions? In the C++ class I took I was told that functions go after main, but I have seen other code where they were at the beginning. Also, how about naming variables? I think all lower case or upper case is not good right, one exception I think is Constants. How about using 0x10C7 instead of 400d.
Do you get what I am looking for? Sort of like the do's and don't of code writing. We sort of have unwritten guidelines for schematics, but have not seen much for code. Thanks for any input.
P.S. Please use C or C++ examples, I don't know assembly
Mucho Gracias
Almost forgot, what about indents?
Do you get what I am looking for? Sort of like the do's and don't of code writing. We sort of have unwritten guidelines for schematics, but have not seen much for code. Thanks for any input.
P.S. Please use C or C++ examples, I don't know assembly
Mucho Gracias
Almost forgot, what about indents?
Last edited: