saple code

hi, i will not ask any question about coding.
i heard that there a few programs in which you change the properties (like color, position,light…)of the objects from a txt document. If u know such programs please give me the address, thanks…

Why not ask questions about coding? This is a coding forum, is it not?

What you want is really pretty simple. Just store your data in a text file and read that in for use in OpenGL… I don’t quite understand what the problem you are having is. Here’s a quick example of a display function that reads the data from a file. Just color and vertex data for this example… the text file would be stored like so

r1 g1 b1
x1 y1 z1
r2 g2 b2
x2 y2 b2

void display()
ifstream fin(“somefile.txt”);
float r,g,b;
float x,y,z;

if (fin >> r >> g >> b)

if (fin >> x >> y >> z)


Thank’s Deiussum. I suppose I would have typed a thousands fingermiles more of code with the standard i/o library before I would have seen the easy-of-use of these filestreams.

Maybe I should not only use my C++ Book as a paperweight, writing-pad, toilet-paper or doorstopper.