Hey all. Hopefully this makes sense. I new to this C++ technique.

I'm working on a project where a program will take custom html tags and convert them to openGL code that can be pasted in a C++ program. That part works well. My question is how do I take this generated opengl code, which is contained in a text file, and have another C++ program read it and compile it so that the graphics can be rendered. In other words, my running program needs to compile an external file and execute it.

give the text file a *.cpp extension then call your compiler to comple it. g++ might be a good one to use for this because of the extensive make file you can create which will tell the compiler how to compile it.