Dan-Tan/riot-cpp

Missing cstring header in client.cpp

Closed this issue · 0 comments

I tried compiling in local and it shows that string header is missing in client.cpp

/home/ian/code/riot-cpp/src/client/client.cpp: In function ‘size_t client::WriteCallBack_header(void*, size_t, size_t, void*)’:
/home/ian/code/riot-cpp/src/client/client.cpp:76:38: error: ‘strlen’ was not declared in this scope
   76 |         if (colon_ind == new_chars + strlen(new_chars)) {
      |                                      ^~~~~~
/home/ian/code/riot-cpp/src/client/client.cpp:13:1: note: ‘strlen’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
   12 | #include "client.h"
  +++ |+#include <cstring>
   13 |
/home/ian/code/riot-cpp/src/client/client.cpp:86:74: error: ‘strlen’ was not declared in this scope
   86 |         new_buffer->insert(new_buffer->end(), &colon_ind[2], new_chars + strlen(new_chars) - 1);
      |                                                                          ^~~~~~
/home/ian/code/riot-cpp/src/client/client.cpp:86:74: note: ‘strlen’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?