It's just a text file. When you have the answer you submit it. If you knew all of the sample input for a problem and what output it would generate, you could submit just the output in TEXT. When you submit in C++, the judge executes your program to generate the output, and then checks it using TEXT.