SGI: Development

Learning to program

Hello all,

I am interested in learning to program for Irix and ? I have an Octane 360 with 2 gigs of RAM and Irix 6.5.22m. I also have a copy of MIPSpro C compiler. Can you describe what else I would need to begin learning. Do I need a copy of C++? Is this pretty expensive? Is there any good books or reference for learning? Any help is appreciated

You need a book, and later something you want to program :)

"The C handbook" By Kernigan&Ritchie is a good first time book on C-programming.

If you want to do GFX, you can ofcourse start with openGL. It's handbook is also famous for its numerous examples, though i don't know if it still can be had...
How about C++, look on ebay?

Thanks for the info.
You mean the front end? Yeah that can be had on ebay. Be sure to mind the correct version of MIPSPro.
It's not so important that you get MIPSPro for C++ learning experience. GCC/G++ is also an excellent compiler to aid you in learning how to program C and C++.

The best C++ book out there is: "The C++ Programming Language, Third Edition" by Bjarne Stroustrup.
mmhh that was the kind of answers i was also looking for, needles to say google is full of this stuff and tuts, but when i need to learn something from zero, a book just a book is preferable for me.... then i can understand tuts etc...

will look for that book ( a friend gave me the ANSI C from the creators of C and Unix, a good book to start off i think), if not here, amazon here we go!

PS: This can also be interpreted as if somebody has a book for sell and want to get some cash for it :roll: (please no underlined :D )

I've already used all the above books at some point of my studyings, but if you need something for "desk-side" fast consults DEITEL is a nice way to go, and has excellent books available on many languages...
dexter1 wrote: The best C++ book out there is: "The C++ Programming Language, Third Edition" by Bjarne Stroustrup.

It's the definitive resource, but to read it is like reading the telephone book.
As a starter in C++, "Accelerated C++" isn't bad.

Other must-reads are the "Exceptional C++" series and the "Effective C++" series. One or two books on the STL won't hurt either.

If you're serious about programming, you want to read something like "Design patterns". I'm currently halfway through "Generic programming and the STL" which is the best C++ book I've read for a while.
Now this is a deep dark secret, so everybody keep it quiet :)
It turns out that when reset, the WD33C93 defaults to a SCSI ID of 0, and it was simpler to leave it that way... -- Dave Olson, in comp.sys.sgi

Currently in commercial service: Image :Onyx2: (2x) :O3x02L:
In the museum : almost every MIPS/IRIX system.
Wanted : GM1 board for Professional Series GT graphics (030-0076-003, 030-0076-004)
it's not a good idea to just write something,

take someone elses program and try making small changes without breaking things first.
I would recommend the book "The C Programming Language" by Kernighan&Ritchie, it is written in a clear and understandable language (it does assume you have some general knowledge of programming, though), not to mention it was written by the people who created C, so you can't go wrong with this one. :)
After your read it, I'd suggest you get a book which describes ANSI C (K&R C is a bit outdated these days). Even if you should decide to learn just ANSI C, the K&R book is still a very good intro to C programming.
You should then look at other people's programs and try to understand what they do, maybe modify a few lines here and there, that should give you some general idea how things work.

As for C++, the book by Bjarne Stroustrup is good, but it is a bit hard to read, as it was pointed out before.
If your bookstore has such books, I'd suggest you browse through different books and choose the one you like the most. :)
So as I am trying to piece together my puzzle here is what I have done so far. I have downloaded GCC which I believe is the front end - correct me if I am wrong - now I need some sort of compiler for opening and closing the source code - please excuse the simple wordage - looking through my software I found a CD labeled, "Compiler Execution Environment 7.3 for Irix 6.5 - 6.5.4". Is this something I need? I also have MIPSPRO C Compiler but it is for Irix 6.4 I believe. Would this be the compiler I need but in a 6.5 version? Thanks for all your help.

K&R and Stroustroup are the bibles of C and C++, but I wouldnt reccomend them to somebody just getting their feet wet in the world of programming.

I agree with Diego.
the Deitel "C how to program" and "c++ how to program" are easy and effective

Being a TA for computer science at the university level (despite one that believes that java is the universal answer to everything) , my bias is that if these are the languages you want to tackle, i would learn C first.

Get a good intro book, then use K&R to master the material.

After youve got that down, and programming SGIs are what you are interested in - look into the following

-A book covering Motif.
- C Interfaces and Implementations by David Hanson
(This book rocks at teaching you how to write quality code in C)
- A decent OpenGL book

I wish I could give better examples but I am at work and my library is at home. I'll edit this later.
If you're trying to start directly with C++ (which is better even if you are not into OOP, IMHO), you can also try the Eckel book "Thinking in C++", downloadable here: (Yup, it's free...)

For C++ programming, GCC is fine. Although it's not very fast, I really like its close conformance to the standard. Just remember to avoid all GCCisms.

Further book recommendations also depend on what you're trying to do (don't know your programming background). You should really have at least one book about algorithms and data structures, e.g. "Algorithms in C++" (Sedgewick) has proved useful in many cases, even if you are not studying CS.
Such bugs and goblins in my life!
(Taken from Hamlet)
I love C. C++ gives me nightmares. The K&R book is not only definative it is also simple, practical and well written. It's all you will ever need in C (+ man pages!).

For Unix C programming (Unix and C are tightly coupled), I like Advanced Programming in the Unix Environment by W. Richard Stevens and also The UNIX Programming Environment by Kernighan and Pike.

The Windows System: Programming and Applications with Xt by Douglas Young is a great GUI programming manual.

OpenGL Programming for the X Windows System by Mark Kilgard will get you going on graphics.
I've started with the book Teach Yourself C++ in 21 days by Sams, pretty well written with lots of examples, and I also have the C/C++/C# Programmers Bible by Kris Jamsa. I started with the teach yourself book and got through the first chapter, but never finished. I guess I should try again since I'm very interested in programming.

:Onyx: :Onyx: :Crimson: :O2000: :Onyx2: :Fuel: :Octane: :Octane2: :PI: :Indigo: :Indigo: :O2: :O2: :Indigo2: :Indigo2: :Indigo2IMP: :Indy: :320: :540: :O3x0: :1600SW: :1600SW: :hpserv:

See them all >here<
dexter1 wrote: The best C++ book out there is: "The C++ Programming Language, Third Edition" by Bjarne Stroustrup.

Old news, but -- ... rview.html