????? ????? ????? stdout ??? ??? ?? ?????? Visual C++/C

?????? ????????? ?????? ?????????
???? ???????: 58667 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

???? ??? ?????? ????? ????? stdout ??? ??? ?? ?????? C ?? ??????? stdout ?????? ??? ???? ???? ?? ??? ????????. ??????? ????? ??????? stdout ?? stdin ?????? C ?? freopen(). ?????? ????? stdout ??? ??? ???? FILE.TXT ?????? ???????? ???????:
   freopen( "file.txt", "w", stdout );
???? ??????? ???????? ???? ??? ????? ????? ?????? stdout ? ???????? ??? ????? FILE.TXT ????? ??? ??????.

?????? stdout ????? (stdout ?????????) ?????? ???????? ???????:
   freopen( "CON", "w", stdout );
?? ?? ?? ??? ??????? ???? ?? ???? ??????? freopen() ?????? ?? ?????? ????? ????? ?????? ????.

???? ????? ?? ?????? ????? ??? ??? ??????? stdout:

??? ?????

// Compile options needed: none

#include <stdio.h>
#include <stdlib.h>

void main(void)
{
   FILE *stream ;
   if((stream = freopen("file.txt", "w", stdout)) == NULL)
      exit(-1);

   printf("this is stdout output\n");

   stream = freopen("CON", "w", stdout);

   printf("And now back to the console once again\n");
}
????? ??? ???????? ??? stdout ????? ?????? ???? ?????? ?? ????? ????????.

???????

???? ???????: 58667 - ????? ??? ??????: 19/???? ?????/1426 - ??????: 4.0
????? ???
  • The C Run-Time (CRT), ????? ?????? ??:
    • Microsoft Visual C++ 1.0 Professional Edition
    • Microsoft Visual C++ 1.5 Professional Edition
    • Microsoft Visual C++ 1.0 Professional Edition
    • Microsoft Visual C++ 2.0 Professional Edition
    • Microsoft Visual C++ 4.0 Standard Edition
    • Microsoft Visual C++ 5.0 Standard Edition
    • Microsoft Visual C++ 6.0 Service Pack 5
????? ??????: 
kbmt kbhowto KB58667 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????58667
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com