Record Detail

Compile Error

In file included from /in/driver/driver.cpp:1:0:
/in/ex2.h: In function 'void log_in(std::__cxx11::string, std::__cxx11::string, User)':
/in/ex2.h:26:5: error: 'strcmp' was not declared in this scope
  if(strcmp(user.name, testName) == 0 && strcmp(user.password, testPassword) == 0){
     ^~~~~~
/in/ex2.h:26:5: note: suggested alternative: 'strtoq'
  if(strcmp(user.name, testName) == 0 && strcmp(user.password, testPassword) == 0){
     ^~~~~~
     strtoq
/in/ex2.h: In function 'void add_blog(std::__cxx11::string, std::__cxx11::string, User)':
/in/ex2.h:53:2: error: expected ';' before '}' token
  }
  ^
/in/ex2.h: In function 'int frequency(User, std::__cxx11::string)':
/in/ex2.h:59:31: error: request for member 'find' in '((Blog_list*)user.User::blog_list)->Blog_list::contents', which is of non-class type 'std::__cxx11::string [10] {aka std::__cxx11::basic_string<char> [10]}'
   if(user.blog_list->contents.find(word) != -1){
                               ^~~~
/in/ex2.h:62:30: error: request for member 'find' in '((Blog_list*)user.User::blog_list)->Blog_list::titles', which is of non-class type 'std::__cxx11::string [10] {aka std::__cxx11::basic_string<char> [10]}'
   if (user.blog_list->titles.find(word) != -1){
                              ^~~~

Information

Submit By
Type
Submission
Homework
Exercise 2
Language
C++
Submit At
2022-10-01 23:17:46
Judged At
2022-10-03 16:16:36
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes