1 Answer
1

It's because you're trying to store an int into an CString.
First get your correct type with var.vt, and then get the correct value accordingly (if this is really an int then vt.intVal).
When you have your int, then you can transform it into a string (std::to_string if you have C++11, or std::atoi).