We are building DLL’s using C++ .As we are having 400 cases in the size of the DLL is getting bigger in size so is there any alternative way of using instead of switch
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depends on the data type you’re switching over. If it’s a dense int range, use a lookup table storing function pointers. In other cases use a
std::mapfrom switched-over values to function pointers.