|
|
вернуться в форумEOLN in C++ Послано AlMag 12 июн 2007 23:59 In Pascal the End of Line looks like EOLN. I can write While not Eoln() Begin ... End; How to make it work in C++? I want to do smthng like scanf("%d",&n); for(; n>0; --n) { while ((c=getc(stdin))!=EOLN) { line[sz]=c; sz++; } ... } Re: EOLN in C++ you should use EOF || '\n' thus you would stop your execution if the line ends or the file ends. It is up to you then to process the to results as they should be. Re: EOLN in C++ I used while ((c = getc (stdin)) != '\n' && c > 0) |
|
|