I personally use void to indicate an empty parameter list in C++ too, I think it makes it more clear (maybe because I do a whole lot of C programming too?).
quote:Original post by TotalCoder I''ll give it a try, do you have a link?
Bloodshed.net.
quote:Original post by TotalCoder But I''ll look into Dev C++, does it have a color syntaxing IDE?
Fantastic doctrines (like Christianity or Islam or Marxism) require unanimity of belief. One dissenter casts doubt on the creed of millions. Thus the fear and hate; thus the torture chamber, the iron stake, the gallows, the labor camp, the psychiatric ward - Edward Abbey
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Null - nope. The standard explicitly states that if you exit main without returning a value, the effect will be that of returning 0.
(VC++ 6.0 doesnt work that way, tho)
Fantastic doctrines (like Christianity or Islam or Marxism) require unanimity of belief. One dissenter casts doubt on the creed of millions. Thus the fear and hate; thus the torture chamber, the iron stake, the gallows, the labor camp, the psychiatric ward - Edward Abbey
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
quote:Original post by Arild Fines I dont recommend it - ergo its not recommended.
yes, i figured that out the first time you said "it''s not recommended"... but, what i meant to ask was: is there a reason for this, or is it a personal taste thing?
Sure there is a reason for it: I dont do it this way, and everybody should do things exactly the same way I do them.
Fantastic doctrines (like Christianity or Islam or Marxism) require unanimity of belief. One dissenter casts doubt on the creed of millions. Thus the fear and hate; thus the torture chamber, the iron stake, the gallows, the labor camp, the psychiatric ward - Edward Abbey
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Thanks everyone for all your posts, critique, and recommendation. I appreciate everything that you have written. I have included everyone that has contributed to the tutorial in the additional credit section of the article, if any of you want your email or other names attached to it, let me know.
I''m working on the next tutorial which will combine input and outpout mostly cin and cout so that the reader can do some interactive stuff.
Sam ----- TotalCoder http://www.totalcoder.com "Resources, tutorials, and articles for the novice, part-time, and hobbyist programmer"
Sam-----TotalCoderhttp://www.totalcoder.com"Resources, tutorials, and articles for the novice, part-time, and hobbyist programmer"
Bjarne is absolutely correct, as I have pointed out earlier in this thread. Read the standard regarding the main function, section 3.6.2, I think(something like that, anyway - I dont have it here right now). The main problem is that VC++ gives you a warning when exiting main without an explicit return statement, and since VC++ is the compiler ''everyone'' uses, people think this is they way its supposed to be.
Fantastic doctrines (like Christianity or Islam or Marxism or Microsoft-bashing) require unanimity of belief. One dissenter casts doubt on the creed of millions. Thus the fear and hate; thus the torture chamber, the iron stake, the gallows, the labor camp, the psychiatric ward - Edward Abbey
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]