Assuming you are currently outputting the result using cout, you can use a file stream and output it with that instead. For example, if you #include <fstream> and add this code to the function that currently outputs the data to the screen:
Code:
std::ofstream fout("filename.txt");
then change cout to fout, it should work.
If you have trouble getting that to work, or it doesn't make sense, you should post some or all of the code that currently outputs information to the screen that you want to change.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.