robertsj / libdetran

deterministic transport utilities
MIT License
2 stars 2 forks source link

const char to str::string error #60

Open robertsj opened 1 year ago

robertsj commented 1 year ago

Compiling on Beocat with GNU 11.3, the current dev branch yields this error:

s/jaroberts/Research/detran/source/src/callow/vector/Vector.hh:138:42: error: could not convert ‘""’ from ‘const char [1]’ to ‘const string&’ {aka ‘const std::__cxx11::basic_string<char>&’}
  138 |   void display(const std::string &name = "") const;
      |                                          ^~
      |                                          |
      |                                          const char [1]
/homes/jaroberts/Research/detran/source/src/callow/vector/Vector.hh:140:42: error: could not convert ‘"vector.out"’ from ‘const char [11]’ to ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}
  140 |   void print_matlab(std::string filename="vector.out") const;
      |                                          ^~~~~~~~~~~~
      |                                          |
      |                                          const char [11]