Writing a simple C++ Program

来源:互联网 发布:梦里花落知多少上一句 编辑:程序博客网 时间:2024/05/29 11:44

Today I write two simple cpp program,one is the console application ,and the second is the windows program.

here I just want to talk about the IO Redirection.As we know that the standard IO Library provide us the input and out. 

 

   sometimes such as we write the windows program ,most often we use MessageBox function to show some debug imformation. But this is not convenient. Infact Most operating systems give us a way of redirecting the input and output streams when we run a program. not just the console program ,also the windows can also redirect the io stream. below is my excution command line.

 

 

D:/cppworkspace/WindowApp/WindowsUI/Debug>WindowsUI.EXE >>d:/a.txt   

 

D:/cppworkspace/WindowApp/Cppstudy/Debug>CppConsole.exe >>d:/a.txt