Basic C++ question

I don't think that that works either. You can't cast a string to anything and expect it to do data conversion, because a string in C/C++ is a pointer to chars, rather than a real data type that casting knows how to do things with ("string" C++ packages may have the capability.)
You can use "atoi(concatenated)"