So, I've managed to do this far and almost, almost done except for this one problem.
The output should be -- CAR = Toyota but instead I got this CAR = (2,3).
The output should be the type of the CAR in string, not some numbers. But I can't seems to figure out how to do this because if I change the variable x,y in the class CAR to string, it will result in an error.
Hmm, I know about to_string(), but that never seems to work for me. If you could make it a char, than I can help you. _ttoi() converts an integer to a char. If you were to use it, here is an example:
1 2 3 4 5
int a = 5;
char t1[];
char *t = &t1;
_ttoi(t);
Know that _ttoi is part of <tchar.h>, so remember to include that. Also, since it is <tchar.h>, it works for TCHARs too. But, it does work with regular chars.
I tried to use the the _ttoi() but there were several errors.
error: 't' is not a type|
|error: ISO C++ forbids declaration of 'atoi' with no type [-fpermissive]|
|error: cannot convert 'char (*)[0]' to 'char*' in initialization|
||=== Build finished: 3 errors, 1 warnings (0 minutes, 0 seconds) ===|