









Functions Are Extern by Default
Unless explicitly declared static, an ordinary function is implicitly declared extern in C and C++. For example: extern void func(int i); // extern is redundant However, sometimes the extern qualifier
Unless explicitly declared static, an ordinary function is implicitly declared extern in C and C++. For example: extern void func(int i); // extern is redundant However, sometimes the extern qualifier
The following code has a subtle bug. Can you detect it? DWORD ErrCode = GetLastError(); // Retrieve the error codeif (!ErrCode==ERROR_FILE_NOT_FOUND) // warning on this line Although the compiler cannot
Normally, you don’t need to implement operator == for comparing string objects, as it’s already defined for you. However, for certain applications, you might need to provide a different version
When Oracle receives a SQL statement to execute, it first looks to see ifthe execution plan already exists in its cache. If the statement does existin the cache, the previous
The following code allows you to move a form by clicking anywhere on the formand dragging it: Option Explicit’define module level variables to store the last position of the form,
Counting the number of object instances of a certain class can be necessary in debugging and performance tuning. To do that, declare a static data member as a counter, and
The following will replace all single quotes in a SQL statement [CHR(39)] with anapostrophe [CHR(180)]. This is useful if you are trying to add names to adatabase as parameter values
The standard function template std::numeric_limits (defined in < limits >) returns the implementation-dependent number of digits that a certain type has: #include int main(){std::numeric_limits < float >::digits10; //6 on my
If you work with SQL Server or Oracle you at some point probably will need todetermine your unique connection identifier. For SQL Server, the connectionidentifier is called a Server Process