OpenCV3.4 'nullptr' was not declared in this scope

Then return him an empty address.
Original code

  1. Compilation environment Windows
  2. Target Compilation Platform Windows
  3. Compile tool Mingw5.3
  4. Error file io_win32.cc
  5. Error line 94
template <typename char_type>
bool null_or_empty(const char_type* s) {
    //TODO: nullptr error
  return (s == nullptr || *s == 0);
}

The function is supposed to return a null pointer but there is no nullptr. The value of the null pointer in the system is 0xCC (the legendary hot and hot), just change it to 0xCC

template <typename char_type>
bool null_or_empty(const char_type* s) {
    //TODO: nullptr error
  return (s == 0xcc || *s == 0);
}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324910703&siteId=291194637