Original Post
I want to make a list of string and values, similar to map. However, I want it to be constants, so it''s like this:
= GetKeyPressed();
cout << "The key you pressed :" << some_var_of_some_type.string << endl;
Output:
The key you pressed: SPACEBAR
The key you pressed: NUMPAD_1
The key you pressed: U
The key you pressed: LEFT_SHIFT
The key you pressed: NUMPAD_1
there is a loop in GetKeyPressed(). In each iteration, it reads if a key on keyboard/mouse/joystick is pressed. However, each key value has its own string value. I don''t want to use string table resource because I want this to be reusable and not project-dependent.
My brain is in dumb state, I know it''s such a simple problem, but I don''t know why I can''t figure it out.
Thanks in advance.
My compiler generates one error message: "does not compile."
My compiler generates one error message: "does not compile."