// udskriv std::cout << "ind er: '" << ind << "'\n"; std::cout << hent(&ind) << "\n"; std::cout << "ind er nu: '" << ind << "'" <<std::endl;
return 0; } "string.cc" 36 lines, 567 characters > g++ string.cc -o ok string.cc: In function `int main()': string.cc:8: syntax error before `{' string.cc:12: `s' undeclared (first use this function) string.cc:12: (Each undeclared identifier is reported only once string.cc:12: for each function it appears in.) string.cc:15: `temp' undeclared (first use this function) string.cc: At top level: string.cc:28: ANSI C++ forbids declaration `ind' with no type string.cc:28: conflicting types for `int ind' string.cc:25: previous declaration as `class string ind' string.cc:28: initialization to `int' from `const char *' lacks a cast string.cc:28: confused by earlier errors, bailing out >
string.cc: In function `class string hent(string *)': string.cc:9: request for member `find_first_of' in `s', which is of non-aggregate type `string *' string.cc:12: request for member `substr' in `s', which is of non-aggregate type `string *' string.cc:15: request for member `size' in `s', which is of non-aggregate type `string *'
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.