C++ and I

I need help. I’m going to start looking for C++ tutorials through Google and start learning what I can. I hope to donate finacialy in the future, but as a student in debt, not just yet. I’ll be postinging my progress periodicaly to this thread (if thats ok?). I’ll be looking for a hard-core C++ coding forum for most questions I have, but any questions regarding HAIKU and C++ will be directly threaded here (again, if that ok?).

But for now, anyone like to help a newb?

Here’s a site or 2 for ya:-

http://www.cplusplus.com/ - Info on C/C++

and then for BeOS programming …

Programming the Be Operating System (4.9MB - PDF)

This is a great book. I wish I had it when I was learning - it would have solved a lot of heartache.

Thank you! The BeBook is especially helpful!

Now it leaves a question of what compiler I should use? Any knowledge of the GNU C++ tools? Anyone using them? Recommendations?

Please, take a look here:

http://www.digitalmars.com/d/

Does D have a future with B?

Bruce Eckel has freely published his two C++ books online. They came in very helpful when I was learning the language.

http://mindview.net/Books/TICPP/ThinkingInCPP2e.html

Well I just set-up Bloodshed’s Dev-C++ development suite, free under the GNU public licence, just to get started and familiar with C++ this is what I’m going to be using.

Eventually I’ll be moving onto the GCC implementation under BeOS 5 once I can get MAX up and running on my computer:

// VincesComputer.cpp
// Pentium III 996MHz
// 384MB PC133 SDRAM
// 18.6GB HD
// ATI RADEON 9000 64MB
// 32X CD-ROM

#include <iostream>

int main() {
cout << “My computer sucks, no?” << endl;
} ///:~

Lol, I can’t get this code to run (much like BeOS5MAX on the descriptor hardware (no CD-R)), but I think I’ll be able to figure it out after some sleep…

I think the ansii standard c++ requires namespaces

using namespace std;

right before or after the include

Yeah, I just downloaded some source code from sourceforge.net, for a GameBoyAdvance emulator: Jesus Christ.

I scrolled through it a bit and I think I temporarily lost my sanity there for a minute, I mean there was this call

u16 DAATable[] = {

That went on like

0x0080,0x0100,0x0200,0x0300,0x0400,0x0500,0x0600,0x0700,
0x0800,0x0900,0x1020,0x1120,0x1220,0x1320,0x1420,0x1520,
0x1000,0x1100,0x1200,0x1300,0x1400,0x1500,0x1600,0x1700,
0x1800,0x1900,0x2020,0x2120,0x2220,0x2320,0x2420,0x2520,
0x2000,0x2100,0x2200,0x2300,0x2400,0x2500,0x2600,0x2700,
0x2800,0x2900,0x3020,0x3120,0x3220,0x3320,0x3420,0x3520,
0x3000,0x3100,0x3200,0x3300,0x3400,0x3500,0x3600,0x3700,
0x3800,0x3900,0x4020,0x4120,0x4220,0x4320,0x4420,0x4520,…

for around 250 lines or so. I mean, is this all hand coded? Please tell me stuff like this is carried out by some uber tool that automates such tedious coding!

Yea, that was probably just some macro… you have to remember with emulators though, they’re basically re-implimenting an entire computer… but something like the GBA isn’t even that simple. Those are probably memory ranges or registers or something. I’m sure all of that came from machine code specs though.

CoolWaterOS wrote:
Thank you! The BeBook is especially helpful!

Now it leaves a question of what compiler I should use? Any knowledge of the GNU C++ tools? Anyone using them? Recommendations?

I taught C++ from C++ How to program by Deitel & Deitel which is a wonderful book to learn from. Also, anything O’Reilly is excellent (and preferable). You might want to check out O’Reillys open book project to see if there is anything there that you can use.

As for the compiler, you should hide yourself from g++ at the moment (one step at a time), let an IDE handle things for you. You mentioned Bloodshed and that should be good until you get the coding down and then look to g++, etc.

SigmaNunki wrote:
CoolWaterOS wrote:
Thank you! The BeBook is especially helpful!

Now it leaves a question of what compiler I should use? Any knowledge of the GNU C++ tools? Anyone using them? Recommendations?

I taught C++ from C++ How to program by Deitel & Deitel which is a wonderful book to learn from. Also, anything O’Reilly is excellent (and preferable). You might want to check out O’Reillys open book project to see if there is anything there that you can use.

As for the compiler, you should hide yourself from g++ at the moment (one step at a time), let an IDE handle things for you. You mentioned Bloodshed and that should be good until you get the coding down and then look to g++, etc.

Yeah, the Dietel and Dietel book is THE BEST! I own both the first and second editions, and I look in them whenever I need to remember some C+±ism.