Sorry,
but with your restrictions, it is impossible.
Regards, Guido
How to display as string a member variable in a struct/class when the mouse hovers on variable?
Manda Rajo
141
Reputation points
That question was always in my head for a very long time, for examples how to turn:
- type=1 into "one".
- type=2 into "two".
- type=3 into "three".
- Member variable with type vec2 into "{x, y}".
- Member variable with type vec3 into "{x, y, z}".
- Member variable with type vec4 into "{x, y, z, w}".
- etc.
I use VSCode with the compiler from Visual Studio 2015:
Note: I cannot use enum because I downloaded source codes from professional developers and they don't use enum, they just use int.
The reason I don't store the string display in a separate member variable is for performance reason, and the variable can be changed at any time but I can forgot to update the string, it's always better to have simple codes as possible for fast development as possible.
Developer technologies | C++
Developer technologies | C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
1 answer
Sort by: Most helpful
-
Guido Franzke 2,191 Reputation points2022-07-25T12:32:33.643+00:00