Have an error dealing with the std string class

Apparently the compiler doesn't like my arguments for std::string::append()
The error is invalid conversion from char to const char*


Also I dereferenced and whatever it is called with *blah and &blah
It compiles but semantic error occurs with &blah
See the reference section re: string::append.


Instead use operator +=

ImgType[i] += Img[i].at(g);
I've tries that and ImgType[i].append(&Img[i].at(g));

Both give errors of semantic types. Reads in console aborted terminate called after throwing an instance of std::out_of_range
What(): basic_string::at
That means Img[i] is shorter than g characters.
Yeah that's what I thought. Thanks
Topic archived. No new replies allowed.