00:00
00:00
Upgrade Your Account!

Hey! To start this decade right, we believe Newgrounds should be ad-free for EVERYONE. For this to work, we need people who have the means to become paying supporters. For just $3 per month or $25 for the year, you can help this happen and get some nice perks!

For the month of March we have disabled ads on all E-M content. We need 84 people to reach our goal of 3,000 active supporters. If we hit that, we'll continue with a new goal in April!

Please check out our Supporter Upgrade and consider coming aboard!

C++: Main

34,428 Views | 137 Replies
New Topic Respond to this Topic

C++: Main 2006-02-17 18:44:39


C++: Main

Your one-topic stop for everything C/C++ related. Feel free to create tutorials and suggest topics. For now I'll split the headings up as follows:

C++ General
Beginning
Intermediate
Advanced

C++ Specific
Beginning
Intermediate
Advanced

C-Only

If you create a C++: main tutorial please link back to this topic, page 99999. Format your topic title as such:

C++: <Topic>
or
C: <Topic>

Since C/C++ share many similarities please indicate at the top of your tutorial if the following code can be applied to just C++ or C AND C++. If you're not sure if your tutorial is applicable to C you can leave it out. If you wish to write a C tutorial then it will go in the C-only section. The C-Only section may or may not change depending on popularity. Also when you create a tutorial post here with a link to that tutorial so that it can be added to the list.

This topic is to be used for adding new tutorials and suggesting them. Please try to limit actual C++ discussion to the topics themselves.

Comments? Suggestions?

Get writing!


BBS Signature

Response to C++: Main 2006-02-17 19:07:18


ill do one on linked lists tomorrow


using ShamelessPlug; NapePhysicsEngine.advertise();

BBS Signature

Response to C++: Main 2006-02-17 19:45:34


I'll start small and do one of declarations of variables, the space they take up and the limitations on their uses. I WILL include <strings>


Perpetually looking for time to return to the arts.

BBS Signature

Response to C++: Main 2006-02-17 19:51:10


Someone should write a tutorial on where to get started as I'm not exactly sure how you get started with this language. What programs you use to write it, or any of that. If someone writes a tutorial I might start with C++ or C.

Response to C++: Main 2006-02-17 21:28:42


Add some links to free compilers.


Sup, bitches :)

BBS Signature

Response to C++: Main 2006-02-18 08:10:36


At 2/18/06 06:22 AM, -liam- wrote: Argh, kinda forgot to close a b tag at the end there..

Not very good. I like the tone and how it was laid out in an informal way but I dont think it really teached much about C++. I think you need to create a few follow up threads in order to make it good.

Also I was thinking about a couple of changes we could possibly make to C++:Main itself. We need a notepad version of the list (a link to one). We could have a useful links section. These are both stolen from AS:Main but these would still be useful. Also we could have something (either a link to a page or on the thread itself) where has a list of tutorials in a linear order so that the readers know what they need to know before learning something. For example the first thing in the list would be -liams- beginning tutorial (getting a compiler basicaly) then something about variables then something about data types then structures etc etc so that is in an order in which someone can pick up and read from beginning to end. (Just a thought let me know what you think).

Also I am really looking forward to Delta and Johnny-whatever's tutorials. I would make one but I dont think i'm a confident enough C++ programmer yet. Maybe I'll make something about loops even though it would apply to pretty much all programming languages :P


- Matt, Rustyarcade.com

Response to C++: Main 2006-02-18 09:19:41


At 2/18/06 08:10 AM, Ninja-Chicken wrote: Not very good. I like the tone and how it was laid out in an informal way but I dont think it really teached much about C++. I think you need to create a few follow up threads in order to make it good.

Of course you need follow up threads, that was an introduction into programming with C++ - I'm not going to go into any specifics with code because that is for specific tutorials. That's why it didn't teach much about C++, because it was introducing it.


Sup, bitches :)

BBS Signature

Response to C++: Main 2006-02-18 13:32:08


C++: Main

Notepad Version of list

C++ GENERAL
============
BEGINNING

C++: Getting Started by -Liam-

INTERMEDIATE
ADVANCED

C++ SPECIFIC
============
BEGINNING
INTERMEDIATE
ADVANCED

C-ONLY

Free Compilers:
Bloodshed c++

Helpul Links:
C Programming

also, liam, you forgot to link back to page 9999 in yours


BBS Signature

Response to C++: Main 2006-02-18 13:38:17


At 2/18/06 01:19 PM, Afro_Ninja wrote: Ok, links to free compilers?

I know of bloodshed C++, that's all
http://www.bloodshed.net/devcpp.html

MinGW
http://www.mingw.org/
Minimalist distro of gcc. DevCPP comes with Mingw as the compiler.

OpenWatcom
http://openwatcom.mirrors.pair.com/
Fucking strict, but awesome. Used to be the industry standard. The IDE is pretty cool too.

GCC
http://gcc.gnu.org/
GNU C Compiler. Uses gay AT&T assembly syntax. __asm is also a function call, which is just ridiculus.

Microsoft Visual C++ Express Edition
http://msdn.microsof..dio/express/visualc/

Free hobby edition of Visual C++. Pretty shitty to be honest. Microsoft have depreciated virtually all C/++ functions. Nice IDE.

Digital Mars
http://www.digitalmars.com/
The shizit. Fast as fuck and twice as pretty. No IDE.

Response to C++: Main 2006-02-18 15:13:48


hahaha

my linked list page is 2 BBS posts so far

ive just finished on adding items

i have a simple theory behind it with a diagram of its structure

then detailed commenting and explanations of code for

an overloaded [] with one parameter for acessing the 'n'th item in list
push() //for adding an item to end
push(num) //for adding 'num' number of items to end
unshift() // for adding an item at start
unshift(num) // for adding 'num' number of items at start
splice(pos) // for adding an item at 'pos'
splice(pos,num)// for adding 'num' number of items at 'pos'

i also have it in a class named Array (go Flash!) with a length variable for the current number of items in the list

lol....

now i need to do deletion of items (which will also change the splice functions)
to splice(pos,deletenum,createnum) so that its used for deleting and adding (like in flash)

Link to image

lol at my diagram, that is to show the structure of a linked list

i even have a hint of directives for defining NULL as 0 if it isnt already defined

at the end im going to have a bit on how the thing as a whole can be improved

i.e. having not just a pointer to the first item in class, but also to the last pointer, and second last pointer
and then a bit on using the linked list

(like getting around its disadvantage of slow random access when you are just looping through the whole thing)

then maybe a bit on other operations like sorting and reversing :p looong tut

i think at the end ill just link to my class with all the functions


using ShamelessPlug; NapePhysicsEngine.advertise();

BBS Signature

Response to C++: Main 2006-02-18 21:19:39


Post this here then? =/

To start with, what do you want to use C/C++ for anyway?
If you want to start writing games, you're definately a far cry away from that. However, it wouldn't hurt to start now because it will take you time to learn anyway.

Game design/programming - To begin there have been a lot of suggestions by people, and the ones I consider reliable are real game programmers. From what GameDev.net, as well as a few programmers from Blizzard Entertainment have told me. They say your better off by just learning C++, mainly because that is the primary language for the graphical libs; DirectX, OpenGL, etc. However, it is true that C++ is a superset of C.

But lets get the party started by sharing a few very good C/C++ sites with extremely useful tutorials:

[Books]
The C Programming Language - Kernighan and Ritchie - Amazon.com - Google
The C++ Programming Language - Stroustrup - Amazon.com -
Starting Out With C++: Standard Version - Gaddis - Amazon.com -

[Newbie/No Programming Experience]
www.cprogramming.com -- Most commonly posted site for tutorials, decent in my opinion. It gives you a very quick and broad overview of the language.
www.cplusplus.com -- Decent beginners tutorials. However, like most books they use a lot of computer terms.

[Intermediate]
http://nehe.gamedev.net/ -- Extremely well written OpenGL tutorials, and highly linked to.
http://geosoft.no/de..opment/cppstyle.html

-- Once you've learned to program, you should start developing a good programming style so other programmers dont have to decode what you're trying to say. I agree with 80% of this document, so just use it as a guideline.

[Advanced]
http://mindprod.com/jgloss/unmain.html -- Programming as a profession? Want to keep your job? This documentation will help you write unmaintainable code, so if they fire you. They will have one hell of a time trying to figure out your code.


I'm your average Afro-American fetus. For example: I enjoy basketball, I'm rather good when I play too, but I'm much too busy scratching my horrific cracked skin these days.

BBS Signature

Response to C++: Main 2006-02-19 01:42:25


So post the tutorials in this post/off site and link or make a whole new thread about it? Which one is more convenient for this C++ Main thing?

Response to C++: Main 2006-02-19 03:46:07


At 2/19/06 01:42 AM, 0x41 wrote: So post the tutorials in this post/off site and link or make a whole new thread about it? Which one is more convenient for this C++ Main thing?

like the flash forum AS:Main

For each tutorial you make a new thread in the programming forum labeled

C++: Tutorial Tite for example C++: Directives

At the top of each thread you link back to this thread (but not to this page, you link to page 99999 so that it always goes to the last and most updated page of this thread)

If other tutorials exist that are related you link to them, like in the one im making i have a rewuirements saying you need knowledge of structures and pointers and OOP, if other tutorials on them exist, i would link to them


using ShamelessPlug; NapePhysicsEngine.advertise();

BBS Signature

Response to C++: Main 2006-02-19 12:44:30


As this approaches page 2 I'm going to go and delete some of the less important posts in this thread in hopes that we have more than one tutorial to start off page 2 with : )


BBS Signature

Response to C++: Main 2006-02-19 12:51:28


At 2/19/06 12:44 PM, Afro_Ninja wrote: As this approaches page 2 I'm going to go and delete some of the less important posts in this thread in hopes that we have more than one tutorial to start off page 2 with : )

well im half way through my linked list one


using ShamelessPlug; NapePhysicsEngine.advertise();

BBS Signature

Response to C++: Main 2006-02-19 13:56:30


Is there really enough C/C++ chat to create one of these? I think we barely have enough for a PHP Main.


Merkd.com - It Pays to Play

Earn real money by betting and investing; or, sponsor, challenge, compete,

recruit, communicate, network, earn money playing games, and much more.

Response to C++: Main 2006-02-19 13:58:48


At 2/19/06 01:56 PM, Pilot-Doofy wrote: Is there really enough C/C++ chat to create one of these? I think we barely have enough for a PHP Main.

I think it is a great idea. But I do agree there might not be enough chat. Also, I really like Java. What if you combine C++ main with Java, and call it something like : C++, Java Main?

It's just an idea, because I'd like to see someone make a Java main, or combine it with this.

Response to C++: Main 2006-02-20 04:16:49


At 2/20/06 02:50 AM, back_to_blackvector wrote: PUT A LINK TO HERE IN YOUR SIG IF YOU SUPPORT C++

Shouldnt we all? Like the AS:main people do.

sure, not that mine actually links to AS:Main but nevermind


using ShamelessPlug; NapePhysicsEngine.advertise();

BBS Signature

Response to C++: Main 2006-02-20 19:04:28



Perpetually looking for time to return to the arts.

BBS Signature

Response to C++: Main 2006-02-21 17:37:05


C++: File I/O - Cyrax88

Response to C++: Main 2006-03-11 19:30:11


Response to C++: Main 2006-03-11 20:27:39



I'm your average Afro-American fetus. For example: I enjoy basketball, I'm rather good when I play too, but I'm much too busy scratching my horrific cracked skin these days.

BBS Signature

Response to C++: Main 2006-03-12 04:05:50


Update on the way


BBS Signature

Response to C++: Main 2006-03-12 04:08:04


C++: Main

Notepad Version of List

C++ GENERAL
============
BEGINNING

C++: The Basics by JFriesen
C++: Getting Started by -Liam-
C++: Datatype and Variables Basics by Johnny_Krysys
C++: Basic Arithmetic by Afro_Ninja

INTERMEDIATE

C++: File I/O by Cyrax88

ADVANCED

C++: Hooking by dave

C++ SPECIFIC
============
BEGINNING
INTERMEDIATE
ADVANCED

C++: 3D Camera by Glaiel_Gamer

C-ONLY

Free Compilers:
Bloodshed c++
MiniGW
OpenWatcom
GCC
Microsoft Visual C++ Express Edition
Visual C++ 2003 Toolkit [SDK and libraries]
Digital Mars

Helpul Links:
C Programming
C Plus Plus
Open GL Tutorials
Writing Un-maintainable code?


BBS Signature

Response to C++: Main 2006-03-12 11:13:22


Cool, it's coming together. I'll write part 2 of mine today.

Response to C++: Main 2006-03-12 11:45:32


At 3/12/06 04:08 AM, Afro_Ninja wrote: Writing Un-maintainable code?

Why is there a link in there that shows people how to write code that is un-maintainable?I don't really think that should be there.

Response to C++: Main 2006-03-12 11:55:28


At 3/12/06 11:45 AM, Dezmerkt wrote:
At 3/12/06 04:08 AM, Afro_Ninja wrote: Writing Un-maintainable code?
Why is there a link in there that shows people how to write code that is un-maintainable?I don't really think that should be there.

someone linked to it on the page before, I debated putting it there or not. I should probably put a warning or something with it. It's basically a cheap way of not getting yourself fired, but I'm pretty sure it's more of a joke than anything. Meh. Kind of unecessary.


BBS Signature

Response to C++: Main 2006-03-12 12:07:06


Here's some links for the useful link section.

Videos

http://www.ddrheaven.com/Tutorials/cpp.asp
(C++)

http://alvea.free.fr/download_4free/c++/ (C++) (I like this one)

Tutorials (written)

C++

Complete C++ language tutorial
http://www.cplusplus.com/doc/tutorial/

Online C++ Tutorial
http://www.intap.net/~drw/cpp/

C++ Programming Tutorial
http://cplus.about.c..brary/blcplustut.htm

C++ tutorial for C users
http://www.4p8.com/e..brasseur/cppcen.html

C++ Tutorials
http://www.glenmccl.com/tutor.htm

C++ Programming Tutorial
http://www.juicystud..torial/cpp/index.asp

C++ Tutorial Links
http://www.mysteries..inux/C-tutorial.html

C

How C Programming Works
http://computer.howstuffworks.com/c.htm

C Programming Tutorial
http://cplus.about.com/library/blctut.htm

C Programming
http://www.strath.ac.uk/IT/Docs/Ccourse/

Programming in C
http://www.cs.cf.ac.uk/Dave/C/CE.html

C Programming Tutorial

Eddie's Basic Guide to C Programming
http://www.iota-six.co.uk/c/default.asp

C Programming contents
http://goforit.unk.edu/cprogram/cstart.htm

Learn C/C++ Today
http://www.cyberdiem.com/vin/learn.html

The Development of the C Language [PDF] -
http://cm.bell-labs...cs/who/dmr/chist.pdf

Good tutorial for C
http://www.its.strath.ac.uk/courses/c/


I'm your average Afro-American fetus. For example: I enjoy basketball, I'm rather good when I play too, but I'm much too busy scratching my horrific cracked skin these days.

BBS Signature