WHAT?!! Yeah, sorry, originally "database" was just called array, then I changed the name but left one instance of array in the post by accident.
So I've fixed that/edited the post. It compiles without error for me, gcc -Wall -pedantic.
Whoops!Code:for (i=0; i<Total; i++) show(array[i]);
strncpy() maybe an issue for some compilers, I dunno. The reason I used that instead of strcpy() was as a primitive form of "input validation", which is important in database programming.



LinkBack URL
About LinkBacks




. I even managed to add a third record!!!!! I understand a lot more of the code now I've seen it in action.