Mail Archives: djgpp/2000/04/21/15:42:27
"Bernhard Stiftner" <stiftnersoftwareNOstSPAM AT gmx DOT net DOT invalid> wrote in
message news:0fd549f4 DOT 922d8d61 AT usw-ex0110-075 DOT remarq DOT com...
> C (I know that this does perhaps not fit into a DJGPP newsgroup, sorry,
but I think (or at
> least I hope) that somebody could help me here, too (please!!!)...).
this statement is correct. you should post basic C related questions to
either news:comp.lang.c or news:comp.lang.c.moderated. while you are at it,
also check out the comp.lang.c FAQ before posting.
> BITMAP *ani1[5]; /* I think this sets up an array of 6
> pointers (ranging von 0 to 5) to these BITMAPs */
actually no ...there is room for exactly 5 pointers (which is what you asked
for) the index ranges from 0 to 4.
> PALLETE junk;
>
> void load_animation(void) { /* load the files ANI000.BMP to
> ANI005.BMP into the array */
> int i;
> char *str;
> char *buf;
> char *fname;
> for (i=0; i<6; i++) {
> itoa(i-1, str, 10);
str points to deep space. it needs to point to valid storage.
> buf = strcat("ani100", str);
ditto.
> fname = strcat(buf, ".bmp");
ditto*ditto.
> So, I don't know what's wrong with my code...
> PS: I'm currently trying to teach C/C++ myself (not an easy
> task - after all, I'm a 15 years old student and I have to
> invest ***huge*** amounts of time in school (although I try
> to reduce that to the absolute minimum...))
this is not as good as an excuse as you think it is ... relax.
--
mailto:Sinan_Unur AT mail DOT com
http://unur.com/
- Raw text -