All depends on what you do in HistoryStart( const char* )
Because you''ll always be passing constant strings you don''t need to allocate new memory with new, neither do you have to declare a static local variable, you simply pass the const char to the function and store it in a stack.
Dunno how you implemented the stack but the easiest way and probably the fastest will be a simple array of pointers: Adding will simply requring assigning the pointer address and incrementing the stack pointer, that should be pretty fast. Removing is a simple decrement of the stack pointer.
The downside of using the array of pointers is obviously that there''ll have to be a limit to the number of allowed entries you can add.
Calling this in tight inner loops is probably not a good idea.
Hope this can help.
You got me interested in doing this as well now