Forum Topic: C++: Main

(11,176 views • 122 replies)

This topic is 5 pages long. [ 1 | 2 | 3 | 4 | 5 ]

<< < > >>
None

Afro-Ninja

Reply To Post Reply & Quote

Posted at: 2/17/06 06:44 PM

Afro-Ninja EVIL LEVEL 35

Sign-Up: 03/02/02

Posts: 13,171

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

None

dELtaluca

Reply To Post Reply & Quote

Posted at: 2/17/06 07:07 PM

dELtaluca LIGHT LEVEL 20

Sign-Up: 04/16/04

Posts: 5,117

ill do one on linked lists tomorrow

My social worker says im special!

BBS Signature

None

Johnny

Reply To Post Reply & Quote

Posted at: 2/17/06 07:45 PM

Johnny DARK LEVEL 20

Sign-Up: 04/17/04

Posts: 3,698

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>


None

Greeley

Reply To Post Reply & Quote

Posted at: 2/17/06 07:51 PM

Greeley NEUTRAL LEVEL 13

Sign-Up: 08/30/05

Posts: 1,207

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.


Thinking

JeremysFilms

Reply To Post Reply & Quote

Posted at: 2/17/06 09:28 PM

JeremysFilms NEUTRAL LEVEL 17

Sign-Up: 02/18/05

Posts: 1,511

Add some links to free compilers.


None

Rustygames

Reply To Post Reply & Quote

Posted at: 2/18/06 08:10 AM

Rustygames LIGHT LEVEL 18

Sign-Up: 05/07/05

Posts: 6,429

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


None

liaaaam

Reply To Post Reply & Quote

Posted at: 2/18/06 09:19 AM

liaaaam NEUTRAL LEVEL 21

Sign-Up: 12/11/04

Posts: 12,766

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.


None

Afro-Ninja

Reply To Post Reply & Quote

Posted at: 2/18/06 01:32 PM

Afro-Ninja EVIL LEVEL 35

Sign-Up: 03/02/02

Posts: 13,171

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

None

White-Rhyno

Reply To Post Reply & Quote

Posted at: 2/18/06 01:38 PM

White-Rhyno DARK LEVEL 38

Sign-Up: 04/28/03

Posts: 2,946

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.


None

thoughtpolice

Reply To Post Reply & Quote

Posted at: 2/18/06 02:37 PM

thoughtpolice DARK LEVEL 10

Sign-Up: 03/24/03

Posts: 3,070

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.

thanks 'bekko.
Xbox Live gamertag: muffin noodle
the empty set


None

thoughtpolice

Reply To Post Reply & Quote

Posted at: 2/18/06 02:40 PM

thoughtpolice DARK LEVEL 10

Sign-Up: 03/24/03

Posts: 3,070

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.

thanks 'bekko.
Xbox Live gamertag: muffin noodle
the empty set


None

SpamBurger

Reply To Post Reply & Quote

Posted at: 2/18/06 02:57 PM

SpamBurger NEUTRAL LEVEL 15

Sign-Up: 07/12/05

Posts: 4,620

You should add cplusplus.com to the helpful links section. Im learning my C++ there.

"However, the game received only two orders, one of which Molyneux speculated was from his mother." -Peter Molyneux's first game The Entrepreneur


None

dELtaluca

Reply To Post Reply & Quote

Posted at: 2/18/06 03:13 PM

dELtaluca LIGHT LEVEL 20

Sign-Up: 04/16/04

Posts: 5,117

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

My social worker says im special!

BBS Signature

None

life

Reply To Post Reply & Quote

Posted at: 2/18/06 09:19 PM

life EVIL LEVEL 40

Sign-Up: 10/04/03

Posts: 11,587

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.

BBS Signature

None

0x41

Reply To Post Reply & Quote

Posted at: 2/19/06 01:42 AM

0x41 EVIL LEVEL 10

Sign-Up: 12/30/04

Posts: 551

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?


None

dELtaluca

Reply To Post Reply & Quote

Posted at: 2/19/06 03:46 AM

dELtaluca LIGHT LEVEL 20

Sign-Up: 04/16/04

Posts: 5,117

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

My social worker says im special!

BBS Signature

None

Afro-Ninja

Reply To Post Reply & Quote

Posted at: 2/19/06 12:44 PM

Afro-Ninja EVIL LEVEL 35

Sign-Up: 03/02/02

Posts: 13,171

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

None

dELtaluca

Reply To Post Reply & Quote

Posted at: 2/19/06 12:51 PM

dELtaluca LIGHT LEVEL 20

Sign-Up: 04/16/04

Posts: 5,117

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

My social worker says im special!

BBS Signature

None

Pilot-Doofy

Reply To Post Reply & Quote

Posted at: 2/19/06 01:56 PM

Pilot-Doofy LIGHT LEVEL 37

Sign-Up: 09/13/03

Posts: 12,282

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

holy jesus what are these goddamn animals


None

DFox

Reply To Post Reply & Quote

Posted at: 2/19/06 01:58 PM

DFox LIGHT LEVEL 30

Sign-Up: 08/09/03

Posts: 9,270

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.


None

dELtaluca

Reply To Post Reply & Quote

Posted at: 2/20/06 04:16 AM

dELtaluca LIGHT LEVEL 20

Sign-Up: 04/16/04

Posts: 5,117

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

My social worker says im special!

BBS Signature

None

Johnny

Reply To Post Reply & Quote

Posted at: 2/20/06 07:04 PM

Johnny DARK LEVEL 20

Sign-Up: 04/17/04

Posts: 3,698


None

Jcrypt

Reply To Post Reply & Quote

Posted at: 2/21/06 05:37 PM

Jcrypt EVIL LEVEL 11

Sign-Up: 08/23/05

Posts: 926

C++: File I/O - Cyrax88


None

JFriesen

Reply To Post Reply & Quote

Posted at: 3/11/06 07:30 PM

JFriesen LIGHT LEVEL 16

Sign-Up: 01/21/06

Posts: 274


None

life

Reply To Post Reply & Quote

Posted at: 3/11/06 08:27 PM

life EVIL LEVEL 40

Sign-Up: 10/04/03

Posts: 11,587


None

Afro-Ninja

Reply To Post Reply & Quote

Posted at: 3/12/06 04:05 AM

Afro-Ninja EVIL LEVEL 35

Sign-Up: 03/02/02

Posts: 13,171

Update on the way

BBS Signature

None

Afro-Ninja

Reply To Post Reply & Quote

Posted at: 3/12/06 04:08 AM

Afro-Ninja EVIL LEVEL 35

Sign-Up: 03/02/02

Posts: 13,171

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

None

JFriesen

Reply To Post Reply & Quote

Posted at: 3/12/06 11:13 AM

JFriesen LIGHT LEVEL 16

Sign-Up: 01/21/06

Posts: 274

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


All times are Eastern Standard Time (GMT -5) | Current Time: 12:45 PM

<< Back

This topic is 5 pages long. [ 1 | 2 | 3 | 4 | 5 ]

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!