View Single Post
Old 02-13-07, 06:07 PM   #16
ViN86
 
Join Date: Mar 2004
Posts: 15,486
Default Re: String Array in C

Quote:
Originally Posted by Tuork
Aight.

Thanks.
yea you can get away with not inputting a size in most windows developer programs, but if youre coding from a text file in C, you need to declare the size of the array.

also, make sure you dont accidentally try to access an element outside the array, that will give you a nice crash (i speak from experience lol)

i wrote a program that plays a game of battleship and i wrote it in C. in the program, i deal with two dimensional arrays constantly throughout the file. if you want i can send you file. its nicely commented (i was graded on it) so it might help quite a bit. send me a pm if you want it, and ill email it to you
ViN86 is offline   Reply With Quote