Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Aikiman

macrumors member
Original poster
Jan 24, 2008
33
0
I got over zealous while browsing at some programming books on Amazon and ordered them without thinking they were books on C++ but Windows specific and not OSX.

Is it still possible for a newbie to use these books while coding with Xcode and the OSX environment?

What are the big things to watch out for so I know when I come to them I can say, "Well I know that wont work" for example?

The book I have is on gaming but the output is through the console window so there are no graphics libraries to access just the built in std libraries Im assuming.
 

SRossi

macrumors regular
May 27, 2009
202
0
Glasgow, Scotland
There shouldn't be any real big differences although if it is on gaming it may go into graphics using a different library and these libraries may be PC specific so you'll need to have a quick look through each chapter before starting.

But there are no differences in a PC's C++ and a Mac's C++ except the libraries that are available for them.

Stephen
 

Ti_Poussin

macrumors regular
May 6, 2005
210
0
I would suggest you to use the STD lib and Boost library. Those are highly portable and may help you greatly. You may want to wait a bit for boost, it's usage may be a bit confusing for a beginner, but well worth the effort, especially if you do multithreading.

As said above, the graphic may be different, unless you use OpenGL. There's a few difference you may get from time to time, but nothing too troublesome. Take care of ownership and file path under OS X (or any Unix/Linux base).

getch may be an example of function not available. But the standard C++ is all there.

I would recommend you to learn how to make a makefile and then move to xCode. This way you gonna learn what you do and what are those option of compiler and linker.

Next think you should really get under control, is design pattern, a good design for starting is always time saved after. http://en.wikipedia.org/wiki/Design_pattern_(computer_science)

It's a must to understand this to do good C++.

And finally, have fun, don't let a difficulty take you down, see them as a challenge and you may go far into it!
 

Aikiman

macrumors member
Original poster
Jan 24, 2008
33
0
Can you tell me a little bit more about Boost?

In terms of 'design pattern' Im working through a book on Beginning Games on Python and he uses this thing he labels as...

"IDEA ALTER"

meaning I = Import/Initialise, D = Display, E = Entities etc etc the point is you work your way down the letters fulfilling each one as you go. The author says this concept can be used in any language relating to gaming.

Is this what you mean by 'design pattern'?
 

Sander

macrumors 6502a
Apr 24, 2008
521
67
The first paragraph of that Wikipedia page explains what a design pattern is in SW engineering. Boost is a collection of extremely high-quality, peer-reviewed C++ libraries. Some of the libraries from Boost ended up in the next revision of the C++ standard. See http://www.boost.org.

Have fun programming!
 

Aikiman

macrumors member
Original poster
Jan 24, 2008
33
0
The first paragraph of that Wikipedia page explains what a design pattern is in SW engineering. Boost is a collection of extremely high-quality, peer-reviewed C++ libraries. Some of the libraries from Boost ended up in the next revision of the C++ standard. See http://www.boost.org.

Have fun programming!

Thanks for the info, I did have a look at the Wiki page but it didnt really make too much sense for me, I will try reading it again though.
 

SRossi

macrumors regular
May 27, 2009
202
0
Glasgow, Scotland
Thanks for the info, I did have a look at the Wiki page but it didnt really make too much sense for me, I will try reading it again though.

I think what sander is trying to get you to look at is a design pattern like UML find the wiki page here this is a way of designing your application before actually doing any code.

It will make your life easier if you do design your project out before actually doing any code.

Stephen
 

chrono1081

macrumors G3
Jan 26, 2008
8,456
4,160
Isla Nublar
If you are really really new then a lot of the stuff the guys are mentioning above will be over your head (although its all great information).

The C++ language is pretty much standard on any OS. The same stuff I wrote in Windows would get put on Mac, and sometimes *gasp!* on my eeePC running linux.

As others have stated there may be a few things that will trip you up. Also XCode can be a little complex to a beginner so if you find it a little foreign you can always download and use something like Netbeans.
 

Aikiman

macrumors member
Original poster
Jan 24, 2008
33
0
That UML looks like really interesting read, thanks for the link. Currently I dont intend on creating applications....yet....I want to use C++ in conjunction with an exisiting application to extend its usability, the application is Maya 2010.

Im am very fresh with OOP but quite familiar with Mayas interpreted language MEL and a little bit of Python, so one would say I am quite a newbie really.
Perhaps after many many months I will take a look at creating a basic app, this is so exciting ;)
 

Aikiman

macrumors member
Original poster
Jan 24, 2008
33
0
I saw this book on Amazon...
Use Case Driven Object Modeling with UMLTheory and Practice by Doug Rosenberg & Matt Stephens
Has anybody read this book and can recommend this or perhaps something else similar?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.