#include #include #include using namespace std; void main() { string STRINGcolor = ("120 180 0 255"); int r,g,b,a; char * cstr, *p; cstr = new char [STRINGcolor.size()+1]; strcpy_s (cstr, STRINGcolor.c_str()); cout << "BEFORE\n"; cout << "cl_crosshair_color: " << STRINGcolor << "\n"; p = strtok (cstr," "); r = atoi(p); p = strtok (NULL," "); g = atoi(p); p = strtok (NULL," "); b = atoi(p); p = strtok (NULL," "); a = atoi(p); cout << "RED: " << r << "\n"; cout << "GREEN: " << g << "\n"; cout << "BLUE: " << b << "\n"; cout << "ALPHA: " << a << "\n"; }