Starting Proggraming


finty

what is this
Joined
Feb 17, 2004
Messages
4,984
Location
Ireland
Website
Visit site
im getting C Programming Language (2nd Edition) by Brian W. Kernighan to begin to proggram, i ultimatly want to write games/proggrams for the gp32, but this book is for ANSI C. is this still a good starting point? is it true that ANSI does not support sound or graphics? Thanks and any tips on starting are much appreciated.
 
I think that ANSI C is just standard C. Some compilers have some extra things. Plain ANSI C can't even output text to the screen (I think). You need libraries to do that. The same for gfx.

P.S. 6 pieces per day!
But I give up, I'll erase my sig :(
 
ANSI is basically just a standard of C. Before C code could be anything you wanted because there was no standard.

Now almost all the compilers out use ANSI C and is what you SHOULD learn to program in. If you want a good book get Teach Yourself C. I don't remember who the publisher was but it wasn't SAMS. This had a green and yellow cover I believe.

It can also be used for a VERY good reference later.
 
CrazyDesi posted on Apr 28 2004 at 08:16 PM said:
ANSI is basically just a standard of C. Before C code could be anything you wanted because there was no standard.

Now almost all the compilers out use ANSI C and is what you SHOULD learn to program in. If you want a good book get Teach Yourself C. I don't remember who the publisher was but it wasn't SAMS. This had a green and yellow cover I believe.

It can also be used for a VERY good reference later.
i got teach your self c++ out of the library but you need C knowledge, it looks good though and teach yourself C is hella cheap. ill get it instead, its just ill have to buy in dollars. if ASNI C cant even display text then what is it used for? dont flame me for my ignorance.
 
Last edited by a moderator:
finty101: rcx doesn't know what it is, I guess. ANSI C is a specification to allow lots of different compilers who previously had conflicting types of C and their own little quirks to work together. Code should theoretically compile on several compilers with identical results (but of course, not neccessarily with identical speed or executable size).

It's a 'brand' of C, and compilers don't have to accept it. Many compilers will deviate somewhat from the standard to allow their own changes or workaround some problems they have. That's why we have to enable -ansi on GCC. It's good practice to use it.

I think what rcx means is that the standard c libraries might not include outputting text to the screen. It does. C, as a language, doesn't do anything special. It needs to include external libraries. stdio contains printf, and iostream for C++ contains the cout and cin stream things that allow output to screen. ANSI is a specification, not a set of libraries, so it has little to do with the problem here.
 
rcx was right, just brief.

finty, basically yes ansi C is a very good starting point. It's what I have spent a little time learning.

Not that I know bugger all what I'm talking about!
 
I said that you needed libraries for I/O :) And most compilers have stdio.h inluded. If you want to output text, just include stdio.h:

#include <stdio.h>

But AFAIK, stdio isn't a part of ANSI C. So I'm right! (I think)
 
The ANSI-C standard includes the ANSI-C standard libraries. stdio.h is a part of it.
Oh. And about that book: finty, that's literally the bible of C programming. It's very good.
 
don posted on Apr 29 2004 at 04:04 PM said:
The ANSI-C standard includes the ANSI-C standard libraries. stdio.h is a part of it.
Oh. And about that book: finty, that's literally the bible of C programming. It's very good.
which book? the first one i mentioned? is it good for beginners though? do i need any programing knowledge at all?
 
Last edited by a moderator:
Yo.
The "C Programming Language (2nd Edition) by Brian W. Kernighan and Ritchie" gives you the basics to learn C... You'll know about variables, loop, pointers, string operations, functions, calculations, and everything you need to know to make any knid of program/game.

When you know the basics, you can download a SDK for GP32 (there are 3 freeware as I know) and apply what you've learned using the functions contained in the SDK. You can find a good reference in the GP32 tutorials...

Good luck in your programming path ;)

Alessandro
 
Back
Top