Can someone write this simple program . . .

I’ve been trying for hours and hours trying to make a ASCII text file loader, that simply loads filenames (blah.bmp) out of the text file.
I’ve been having tons of trouble reading and writing files, so if someone could write this simple example, where it puts the filenames in an array, I’d be extremely gratefull. I’ve already looked at tutorials also, they don’t help much because it’s hard to see what’s going on in an OpenGL application.

Schlos, what kind of restrictions do u put on ur file format?

not very opengl… lionhead board is better at this.
just a hint: open your file as binary and read char by char!


Assuming you’re using C/C++, and ignoring the OpenGL part of the prog,

#include <stdio.h>

void main(void)
FILE *inout;
char buffer[20][20];

inout=fopen("text.dat", "rt");
for (int n=0;n&lt;=20;n++)