2 ms·
During an interview for a job with a Wall Street outfit, the interviewer asked me “In C++, how would you determine the concrete type of a pointer to a base clas
by rcurry 5y ago
During an interview for a job with a Wall Street outfit, the interviewer asked me “In C++, how would you determine the concrete type of a pointer to a base class if you did not have runtime type information?”
I couldn’t think of an answer, and then he explains “It’s quite simple - you would use dynamic_cast.”
I needed the job so I just smiled and said “Oh, that’s really cool - I didn’t know about that.”