Сбор пожертвований на сервер для UBUNTU.RU
0 Пользователей и 1 Гость просматривают эту тему.
#include <stdio.h>#define MAXLINE 1000int getl(char line[], int maxline);void copy(char to[], char from[]);int main(){ int len; int max; char line[MAXLINE]; char longest[MAXLINE]; max = 0; while((len = getl(line, MAXLINE)) > 0) if (len > max){ max = len; copy(longest, line); } if(max > 0) printf("%s", longest); return 0;}int getl(char s[], int lim){ int c,i; for (i = 0; i < lim-1 && (c = getchar())!= EOF && c!='\n'; ++i) s[i] = c; if (c =='\n'){ s[i] = c; ++i; } s[i] = '\0'; return i;}void copy(char to[], char from[]){ int i ; i = 0; while ((to[i] = from[i] != '\0')) ++i;}
Description Resource Path Location Typemake: *** [lines] Error 1 lines line 0 C/C++ Problemundefined reference to `main' lines line 0, external location: C/C++ Problem
**** Build of configuration Debug for project line ****make all Building file: ../1.cInvoking: GCC C Compilergcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"1.d" -MT"1.d" -o"1.o" "../1.c"Finished building: ../1.c Building target: lineInvoking: GCC C Linkergcc -o"line" ./1.o Finished building target: line
Вопрос: что делать?
Страница сгенерирована за 0.098 секунд. Запросов: 25.