I can not find an error.

#include "stdafx.h" #include <conio.h> \\ для функции getch() #include <stdio.h> \\ для функций printf(), getchar(), putchar() #define eof (-1) \\ признак конца файла <Ctrl>+<z> int main() { int c; printf("make input>n"); c = getchar(); while (c != eof) { \\ error C2143: синтаксическая ошибка: отсутствие";" перед "{" putchar(c); c = getchar(); } getch(); /* вводит символ, но без эхо-сопровождения (для организации задержки экрана) */ } 
  • @Viktorwot, To format the code, select it with the mouse and click on the button 101010 of the editor. - Nicolas Chabanovsky
  • and why in define eof brackets are needed? Also, you can write this: while (eof != (c = getchar() ) ) {...} - jmu
  • @Viktorwot, but what is common (and already defined in <stdio.h> ) that EOF didn’t like? - avp

1 answer 1

And I always thought that a string comment is // not \\

here they are from your define and crawl into the code

  • one
    Thank you from the Soul. I am ashamed for distraction. - Viktorwot