Borderou de evaluare (job #1603536)

Utilizator TataruTataru Mihai Tataru Data 17 februarie 2016 17:18:08
Problema Lant Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘void add(char*)’: user.cpp:16:43: error: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive] for(int i = 0; i < nc && strcmp(p, c[i]); ++i); ^ In file included from /usr/include/c++/4.8/cstring:42:0, from user.cpp:3: /usr/include/string.h:143:12: error: initializing argument 2 of ‘int strcmp(const char*, const char*)’ [-fpermissive] extern int strcmp (__const char *__s1, __const char *__s2) ^ user.cpp:17:13: error: ‘i’ was not declared in this scope if (i == nc) ^ user.cpp:18:26: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive] strcpy(c[nc++], p); ^ In file included from /usr/include/features.h:357:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:420, from /usr/include/c++/4.8/iostream:38, from user.cpp:1: /usr/include/i386-linux-gnu/bits/string3.h:103:1: error: initializing argument 1 of ‘char* strcpy(char*, const char*)’ [-fpermissive] __NTH (strcpy (char *__restrict __dest, __const char *__restrict __src)) ^ user.cpp: In function ‘void read()’: user.cpp:23:5: error: ‘ifstream’ was not declared in this scope ifstream fin(inFile); ^ user.cpp:23:5: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from user.cpp:1: /usr/include/c++/4.8/iosfwd:157:34: note: ‘std::ifstream’ typedef basic_ifstream<char> ifstream; ^ user.cpp:23:14: error: expected ‘;’ before ‘fin’ ifstream fin(inFile); ^ user.cpp:25:5: error: ‘fin’ was not declared in this scope fin>>k; ^ user.cpp:30:15: error: incompatible types in assignment of ‘char*’ to ‘char* [31]’ p = strtok(s, " .,;:?-!"); ^ user.cpp:31:19: warning: the address of ‘p’ will always evaluate as ‘true’ [-Waddress] while(p) { ^ user.cpp:32:22: error: cannot convert ‘char**’ to ‘char*’ for argument ‘1’ to ‘void add(char*)’ add(p); ^

Ceva nu functioneaza?