I’ll try to cut to the chase. I’m in an introductory C++ course, and our assignments need to be submitted as the .cpp file and also have the output file as a .txt file. My professor gave these instructions to do so, but I just cannot figure it out at all. “To create the output text file (e.g., Lab 1 Output.txt) from the console, you can do it by right clicking the top left icon of the console (which shows the “C:”), select “Export text”, and save it as the output text file for your program.”
The attached image is what my professor had and gave as an example.
(https://i.sstatic.net/lGtSi8K9.png)
This is the following code that I’m trying to test to create this .txt, but I don’t see any of the “Export text” option anywhere when I run it via the Windows debugger.
#include<iostream>
#include<string>
using namespace std;
int main ()
{
string s_temp;
cout << "Hello World! n";
cout << "My name is: ";
getline(cin, s_temp);
cout << endl << "I will be a great C++ programmer by the end of 12/2024. n";
return 0;
}