If you don't use the c functions to output data you can use the following code to write stuff into the output/file
std::cout << scientic << variable << std::endl;