GP32 Getting Into C++...


I need to compile for the PC first, because I'm going to be following a guide for the PC. Then, after I know C++, I'm going to compile for the GP32, which I can already do.
 
This thread is sooooo confusing, people seem to be using the same terms for different things.

I would personally advise that you start by learning how to code for the PC before you try coding for the GP32.

To code try to get hold of Microsoft Visual C (MSVC). You can use this for writing out your code and for compiling your code into executables (.exe files)

Failing that you could write your code in textpad, and get hold of GCC for the PC to compile your written code. This method is more difficult than using MSVC in my opinion as you have to use makefiles.

Get a simple book on writing C, somthing along the lines of C for dummies. You could also get somthing like Idiots guide to C++ if you wanted to get straight into C++. I find books are better than internet tutorials, make sure you try to complete the exercises that are in the book you get as this is where you will learn the most.

When you thouroughly know everything in this simple book you could get an advanced C++ book, and use tutorials on the internet for graphics programming. The advanced C++ book should be about a 1000 pages and cover things like virtual functions, templates and static functions. Don't get the advanced book before the simple book cos it will be hard and offputting!

All of your initial programs will be text based running in a dos box window, ie no graphics. It is important to get this grounding before moving into programming graphics.

At the stage of getting the big book, and programming graphics you could start trying to code stuff for the GP32. At the moment I use MSVC to write out the code and GCC to compile it to an ARM excecutable. I got the GCC for ARM compiler in the Devkitadvance package which is available for download on many GP32 sites.
 
So, I should start with a book? I was thinking I should start with an internet guide, then after that consider an advanced book. BTW, something I was always wondering, how do programmers insert graphics into their programs? Like for the GP32, how do programmers add sprites from a gif file on their computer and translate it into code?

BTW, what advanced book do you think I should get?

EDIT: Also, for MSVS, should I do a full install where I install everything, or should I just install the required files and Microsoft Visual C++ 6.0?
 
So, I should start with a book? I was thinking I should start with an internet guide, then after that consider an advanced book. BTW, something I was always wondering, how do programmers insert graphics into their programs? Like for the GP32, how do programmers add sprites from a gif file on their computer and translate it into code?

BTW, what advanced book do you think I should get?
Most of the ~1000 page books cover the same things, so I would advise going into a bookshop or library and skimming through them to see which style you prefer.

In general grapichics are loaded into programs by finding out the structure of the graphics format you wish to load, either from the internet, or from a book (normally from the internet). You will then set up a structure to hold the image data and load the image into memory. The code for loading is slightly different depending on the machine you are coding for. You have to do this for every image.

Learning to code isn't easy, but it is very very rewarding when you get somthing to work. Just don't try to do graphics before you fully understand:

Pointers.
Structures.
File loading.

And, I personally think that the idiot guide style books are better to start to learn to code with than internet tutorials. Although tutorials are normally the best way of finding out how to set up compilers such as GCC.
 
Last edited by a moderator:
EDIT: Also, for MSVS, should I do a full install where I install everything, or should I just install the required files and Microsoft Visual C++ 6.0?
I just install the Visual C++ 6.0 stuff. Also, if you can, get the MSDN collection and install that, or you won't have any help files (and they are normally pretty good).
 
Last edited by a moderator:
EDIT: Also, for MSVS, should I do a full install where I install everything, or should I just install the required files and Microsoft Visual C++ 6.0?
I just install the Visual C++ 6.0 stuff. Also, if you can, get the MSDN collection and install that, or you won't have any help files (and they are normally pretty good).
3 of the options are ActiveX, Enterprise Tools, and Microsoft Visual SourceSafe6.0. Should I install these?
 
Last edited by a moderator:
EDIT: Also, for MSVS, should I do a full install where I install everything, or should I just install the required files and Microsoft Visual C++ 6.0?
I just install the Visual C++ 6.0 stuff. Also, if you can, get the MSDN collection and install that, or you won't have any help files (and they are normally pretty good).
3 of the options are ActiveX, Enterprise Tools, and Microsoft Visual SourceSafe6.0. Should I install these?
I have never used ActiveX and I can't remember what Enterprise Tools are.
Visual Sourcesafe isn't nessesary, as it is a way of letting a team of coders work on files at the same time and then merge them together.
 
Last edited by a moderator:
Ok, I didn't install those 3.

But what about registering environment variables? I remember doing this before when I was on IRC, but that was with DevkitARM, and I think the GP32 SDK. Should I check this box?

EDIT: It's supposed to allow me to run Visual C++ tools from the command line by registering environment variables.
 
Ok, I didn't install those 3.

But what about registering environment variables? I remember doing this before when I was on IRC, but that was with DevkitARM, and I think the GP32 SDK. Should I check this box?

EDIT: It's supposed to allow me to run Visual C++ tools from the command line by registering environment variables.
I think that I normally do this (it's been a long time since I had to install).

I'm off to lunch now - if you have any more questions I'll be back in about an hour.
 
Last edited by a moderator:
I'm gonna say the complete opposite; a book is a waste of time, instead learn the basics from a tutorial and start making games. You'll run into problems, but just ask people on IRC or IM for help and you will gradually learn it yourself, without the annoyance of following exercises. That's what worked for me anyway. Only thing I will suggest is, use a book to learn pointers, because few people can explain them well. Also you might want to look at a book for the more complex C++ stuff like virtual functions, polymorphism/abstract base classes, STL, operators -- but I didn't. When I was interested in it, I just popped it into Google and read up.
 
I prefer books cos I hate having to alt-tab to check stuff that I'm working on, and if I need to look somthing up quickly that I can't remember the name of then I can find it in a book quicker (cos I will know which chapter it is covered in), but each to their own I guess. ;)
 
I'm gonna say the complete opposite; a book is a waste of time, instead learn the basics from a tutorial and start making games. You'll run into problems, but just ask people on IRC or IM for help and you will gradually learn it yourself, without the annoyance of following exercises. That's what worked for me anyway. Only thing I will suggest is, use a book to learn pointers, because few people can explain them well. Also you might want to look at a book for the more complex C++ stuff like virtual functions, polymorphism/abstract base classes, STL, operators -- but I didn't. When I was interested in it, I just popped it into Google and read up.
Any suggestions to learn the basics then? I've did your tutorials a while ago.

Maybe tobriand can help, I know he did his first project a while ago, the ascii painter thing B).
 
Last edited by a moderator:
I get the feeling that breaking into the codeing world is extremily hard, it is hard to find a guide/book for C which is for total beginners. But hopefully by the end of the summer I should have some knowledge :)
 
I prefer books cos I hate having to alt-tab to check stuff that I'm working on, and if I need to look somthing up quickly that I can't remember the name of then I can find it in a book quicker (cos I will know which chapter it is covered in), but each to their own I guess. ;)
Yeah, but I don't actually own any C books *shame* the only experience I have is with PDF, which of course requires Alt+Tabbing as well. One tactic is to put the code and the tut in the same screen, having them split. Best if you are running at a high res (1280x1024 here). I see your point though.
 
Last edited by a moderator:
Gah! That internet guide I was using sucks! It doesn't explain everything in layman's terms, instead, it quickly defines everything in a complicated manner. I think I'm just going to buy a book instead today, but now I'm back at which one?

C++ For Dummies, 4th Edition
C++ For Dummies, 5th Edition (Released 2 months ago)
Sams Teach Yourself C++ in 21 Days, 4th Edition

Which one should I get? I added in 4th Edition because as I was going through it on Amazon.com, I noticed that it seemed a little better than 5th edition because 4th Edition included stuff about GNU in the first few setup pages and I didn't see this in the 5th Edition. Also, 5th Edition is still kind of new, so I don't know how good it is compared ot 4th Edition, which has been out for some time now. 5th tells you how to install Dev-C++, 4th tells you how to install GNU C++. Which one is better?

EDIT: The friendly people at GP32DEV just explained to me that GNU C++ actually compiles the code when you use Dev-C++, meaning 5th Edition is better. But, now should I get C++ For Dummies or Sam's Teach Yourself C++ in 21 Days?
 
Azure posted on Jul 7 2004 at 10:42 PM said:
Gah! That internet guide I was using sucks! It doesn't explain everything in layman's terms, instead, it quickly defines everything in a complicated manner. I think I'm just going to buy a book instead today, but now I'm back at which one?

C++ For Dummies, 4th Edition
C++ For Dummies, 5th Edition (Released 2 months ago)
Sams Teach Yourself C++ in 21 Days, 4th Edition

Which one should I get? I added in 4th Edition because as I was going through it on Amazon.com, I noticed that it seemed a little better than 5th edition because 4th Edition included stuff about GNU in the first few setup pages and I didn't see this in the 5th Edition. Also, 5th Edition is still kind of new, so I don't know how good it is compared ot 4th Edition, which has been out for some time now. 5th tells you how to install Dev-C++, 4th tells you how to install GNU C++. Which one is better?

EDIT: The friendly people at GP32DEV just explained to me that GNU C++ actually compiles the code when you use Dev-C++, meaning 5th Edition is better. But, now should I get C++ For Dummies or Sam's Teach Yourself C++ in 21 Days?
I've recently brought the 5th edition of the dummies book, and it's pretty good.
 
Last edited by a moderator:
Back
Top