Avoid Using malloc() and free() in C++
The use of malloc() and free() functions in a C++ file is not recommended and is even dangerous: 1. malloc() requires the exact number of bytes as an argument whereas
The use of malloc() and free() functions in a C++ file is not recommended and is even dangerous: 1. malloc() requires the exact number of bytes as an argument whereas
If your class contains other object(s) as members, you should initialize the embedded object(s) in a mem-initializer list instead of assigning their values inside the class constructor: class Person {
All member functions implemented within a class declaration are by default inline: //file: A.hclass A { int a; public: int Get_a() { return a; } //declaration + definition; //implicitly inline
When working on developing or debugging an app that is created via automation (i.e. ActiveX DLL), keep in mind the following: if you invoke that app from a calling program
Be aware that the VB IDE hijacks the registry settings for your public classes when working on projects such as ActiveX DLLs and Controls. The IDE will temporarily replace (in
When passing a variant array by reference, make sure to use Dim to declare the statement before using Redim. Example: Private Sub Command1_Click()Dim x as integer ReDim v(2) As Variant
When you have multiple web pages calling the same client script code, locate the shared script code in a separate file (e.g. Shared1.js) and reference the shared code in each
You can change the types of files recognized by the DevStudio editor by adding the file type to the following registry key: HKEY_CURRENT_USERSoftwareMicrosoftDevStudio5.0IstudioProjectEditors For example, to allow JavaScript source files
Fast, Efficient and Easy Way to Initialize Local ArraysBy default, local data arrays created on the stack are not initialized; they contain garbage values. The easiest, most efficient and future-proof