I am using microsoft visual studio to do C++.
I don’t see std::err and std::out in the output console of the IDE.
Is there a way to redirect them ?
I am using microsoft visual studio to do C++. I don’t see std::err and
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can indeed redirect std::out and std::err. Simply right click on your project in the solution explorer and select
Properties. Then selectConfiguration Properties -> Debuggingand put the appropriate arguments into theCommand Argumentsfield. For example, to redirect std::err to a file, I would type in2> ErrorLog.txt.The things you type in
Command Argumentssimply get appended as command line arguments when Visual Studio runs your program, just like you had manually typed them in to the console. So, the above example simply tells VisualStudio to run your program with the command<programName>.exe 2> ErrorLog.txtinstead of just<programName>.exe.