Be a Supporter!

C++: Main

  • 25,273 Views
  • 144 Replies
New Topic Respond to this Topic
Afro-Ninja
Afro-Ninja
  • Member since: Mar. 2, 2002
  • Offline.
Forum Stats
Moderator
Level 44
Game Developer
C++: Main 2006-02-17 18:44:39 Reply

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
dELtaluca
dELtaluca
  • Member since: Apr. 16, 2004
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to C++: Main 2006-02-17 19:07:18 Reply

ill do one on linked lists tomorrow


using ShamelessPlug; NapePhysicsEngine.advertise();

BBS Signature
Johnny
Johnny
  • Member since: Apr. 17, 2004
  • Offline.
Forum Stats
Member
Level 24
Blank Slate
Response to C++: Main 2006-02-17 19:45:34 Reply

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
Greeley
Greeley
  • Member since: Aug. 30, 2005
  • Offline.
Forum Stats
Member
Level 13
Blank Slate
Response to C++: Main 2006-02-17 19:51:10 Reply

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.

JeremysFilms
JeremysFilms
  • Member since: Feb. 18, 2005
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Response to C++: Main 2006-02-17 21:28:42 Reply

Add some links to free compilers.

liam
liam
  • Member since: Dec. 11, 2004
  • Offline.
Forum Stats
Member
Level 22
Blank Slate
Response to C++: Main 2006-02-18 06:22:34 Reply

Argh, kinda forgot to close a b tag at the end there..


Sup, bitches :)

BBS Signature
Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to C++: Main 2006-02-18 08:10:36 Reply

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

liam
liam
  • Member since: Dec. 11, 2004
  • Offline.
Forum Stats
Member
Level 22
Blank Slate
Response to C++: Main 2006-02-18 09:19:41 Reply

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
Afro-Ninja
Afro-Ninja
  • Member since: Mar. 2, 2002
  • Offline.
Forum Stats
Moderator
Level 44
Game Developer
Response to C++: Main 2006-02-18 13:32:08 Reply

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
White-Rhyno
White-Rhyno
  • Member since: Apr. 28, 2003
  • Offline.
Forum Stats
Member
Level 38
Blank Slate
Response to C++: Main 2006-02-18 13:38:17 Reply

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.

thoughtpolice
thoughtpolice
  • Member since: Mar. 24, 2003
  • Offline.
Forum Stats
Member
Level 10
Blank Slate
Response to C++: Main 2006-02-18 14:37:49 Reply

If you're on windows and want a free compiler, I recommend either MinGW or the Microsoft Visual C++ 2003 Toolkit.

If you go for the toolkit, be sure to ALSO download the platform SDK, as it has everything you need. When you install the sdk just be sure to copy things like binaries/includes/libs into the Visual C++ 2003 toolkit folder, it's a pretty good compiler and the platform SDK is free and has absolutely _everything_ you could need for windows development.


omg.
Playstation Network tag: muffin-noodle
the empty set

thoughtpolice
thoughtpolice
  • Member since: Mar. 24, 2003
  • Offline.
Forum Stats
Member
Level 10
Blank Slate
Response to C++: Main 2006-02-18 14:40:56 Reply

Whoops.

http://msdn.microsof..sualc/vctoolkit2003/

http://www.microsoft..5&displaylang=en

A good feature of mingw that some cross-operating system programmers might like is the fact that it is is a cross compiler, if you're on linux, and you've installed everything mingw needs, you can do a /path/to/mingw/gcc -mwindows test.c and it'll compile it as a windows application.


omg.
Playstation Network tag: muffin-noodle
the empty set

dELtaluca
dELtaluca
  • Member since: Apr. 16, 2004
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to C++: Main 2006-02-18 15:13:48 Reply

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
life
life
  • Member since: Oct. 4, 2003
  • Offline.
Forum Stats
Moderator
Level 52
Blank Slate
Response to C++: Main 2006-02-18 21:19:39 Reply

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
0x41
0x41
  • Member since: Dec. 30, 2004
  • Offline.
Forum Stats
Member
Level 10
Blank Slate
Response to C++: Main 2006-02-19 01:42:25 Reply

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?

dELtaluca
dELtaluca
  • Member since: Apr. 16, 2004
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to C++: Main 2006-02-19 03:46:07 Reply

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
Afro-Ninja
Afro-Ninja
  • Member since: Mar. 2, 2002
  • Offline.
Forum Stats
Moderator
Level 44
Game Developer
Response to C++: Main 2006-02-19 12:44:30 Reply

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
dELtaluca
dELtaluca
  • Member since: Apr. 16, 2004
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to C++: Main 2006-02-19 12:51:28 Reply

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
Pilot-Doofy
Pilot-Doofy
  • Member since: Sep. 13, 2003
  • Offline.
Forum Stats
Member
Level 37
Musician
Response to C++: Main 2006-02-19 13:56:30 Reply

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

DFox
DFox
  • Member since: Aug. 9, 2003
  • Offline.
Forum Stats
Member
Level 30
Blank Slate
Response to C++: Main 2006-02-19 13:58:48 Reply

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.


BBS Signature
dELtaluca
dELtaluca
  • Member since: Apr. 16, 2004
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to C++: Main 2006-02-20 04:16:49 Reply

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
Johnny
Johnny
  • Member since: Apr. 17, 2004
  • Offline.
Forum Stats
Member
Level 24
Blank Slate
Response to C++: Main 2006-02-20 19:04:28 Reply

C++: Datatype and Variables basics -By Johnny_Krysys


Perpetually looking for time to return to the arts.

BBS Signature
Jcrypt
Jcrypt
  • Member since: Aug. 23, 2005
  • Offline.
Forum Stats
Member
Level 11
Blank Slate
Response to C++: Main 2006-02-21 17:37:05 Reply

C++: File I/O - Cyrax88

Glaiel-Gamer
Glaiel-Gamer
  • Member since: Dec. 28, 2004
  • Offline.
Forum Stats
Member
Level 28
Game Developer
Response to C++: Main 2006-03-11 17:49:28 Reply

http://www.newground../topic.php?id=448031

JFriesen
JFriesen
  • Member since: Jan. 21, 2006
  • Offline.
Forum Stats
Member
Level 16
Blank Slate
Response to C++: Main 2006-03-11 19:30:11 Reply

Here you go :)

http://www.newground../topic.php?id=448180

life
life
  • Member since: Oct. 4, 2003
  • Offline.
Forum Stats
Moderator
Level 52
Blank Slate
Response to C++: Main 2006-03-11 20:27:39 Reply

C++: Hooking.


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
Afro-Ninja
Afro-Ninja
  • Member since: Mar. 2, 2002
  • Offline.
Forum Stats
Moderator
Level 44
Game Developer
Response to C++: Main 2006-03-12 04:05:50 Reply

Update on the way


BBS Signature
Afro-Ninja
Afro-Ninja
  • Member since: Mar. 2, 2002
  • Offline.
Forum Stats
Moderator
Level 44
Game Developer
Response to C++: Main 2006-03-12 04:08:04 Reply

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
JFriesen
JFriesen
  • Member since: Jan. 21, 2006
  • Offline.
Forum Stats
Member
Level 16
Blank Slate
Response to C++: Main 2006-03-12 11:13:22 Reply

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

Craige
Craige
  • Member since: Jul. 17, 2004
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to C++: Main 2006-03-12 11:45:32 Reply

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.