September 18, 2000

string::npos

Question: Could you please explain what the significance of string::npos is in the statement? someString.find_first_not_of(“0123456789”)==string::npos Answer: string::npos is a constant integer that holds the maximum value of characters that a string can store + 1. This value is used in searching algorithms to indicate that the sought-after value was not

Checking If a Function Pointer is Valid

Question: I am collecting a number of function pointers in C++ and before I call them I want to check to see if they have been set. I really want to avoid calling them if they aren’t valid. I have triedthe following “if func != Null { … ” but

How to Use Some Variable in 2 EXE Programs

Question: Can you to tell me how to use a variable in other VB projects; i.e.,how to use some variable in two EXE-compiled VB projects? Answer: Because of the way Windows allocates memory, this is a fairly difficult and somewhat dangerous thing to do. An easier method is to use