Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C 

C++ Beginners Tutorial Part I

(Dec 31, 2011 12:55 PM)ryan⚜ Wrote:  1) I'm not returning a value therefore void will work just fine.
2) Because I use void, I don't have to have a return value, so return 0; is unnecessary and would cause errors. I also save like 2 bits of memory which is EXTREMELY important.
3) If you read through my tutorial, I explain why void is okay to use while int isn't necessary for these purposes.

If I recall right the ISO standard for C++ states that typing the words "return 0" is optional, but I think the standard is to still use int for main. In fact I'm pretty sure they threaten to come after your family if you do not use an integer return type for main.

by the way, nice tutorial, stick with it.
I think he should use the extensions local to his compiler if he is making a tutorial on that specific compiler, that being stated you should also state that other extensions if they were to use a different compiler. I code myself and I use void main(), due to it working on my compiler.
@ Regios:

Keep making tutorials. Don't worry about ignorant members here on the forum. YOU are contributing useful information even if it is towards beginners. What are they doing? See my point. I'd like to see more tutorials on C++. Hopefully higher difficulty tutorials if you can. I try to read a few different materials on the same subject (ex: on for loops, on arrays, etc...) so I can get a complete understanding of it.
nice beginner tutorial, keem 'em coming!
thank u man very much i read this tutorial and i take some note thanks
ye thanks i was getting into C++ recently
(Jan 14, 2012 01:33 AM)Regios Wrote:  I just wanted to apologize for taking forever to put up the next tutorial. I've been super busy getting everything ready and traveling, I'm working on this right now as well as a few other tutorials so please be patient. Thanks for understanding!

Estimated time of arrival?... 😅

(Jan 14, 2012 01:33 AM)Regios Wrote:  I just wanted to apologize for taking forever to put up the next tutorial. I've been super busy getting everything ready and traveling, I'm working on this right now as well as a few other tutorials so please be patient. Thanks for understanding!

Estimated time of arrival?... 😅
I actually learned some C++
Thanks for this man.
(Jan 16, 2012 12:20 PM)sanoonas Wrote:  So, this is most likely something stupid, but when i run in, it pops up and goes back down, and in the bottom box it says stuff about not being able to find the pbd files?
Thanks to any help.

I am having the same exact problem, also I have teamviewer
Great 1st lesson mate.

I don't know anything about programming, and thanks to your tutorial, I have!

Please keep up the good work and keep the tutorials coming! GREAT WORK!

Thanks also to G4143 for the constructive criticism. It makes sense to do things the right way, but if you know why it was done in the other "particular" way then you'll realise that it's OK!

Thank you!


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by w3w3w3Aug 3, 2021 12:38 PM 1 328 Aug 3, 2021 12:38 PM
Last Post: SIM-5058597
[C] by g4143Aug 21, 2019 01:44 PM 6 511 Aug 21, 2019 01:44 PM
Last Post: YouthInAsia
[.NET] by blake.haleApr 8, 2018 10:31 AM 8 638 Apr 8, 2018 10:31 AM
Last Post: adenfr