ILE C/C++ Programmer's Guide

Using Static Class Member Functions or Global Variables

C++ language onlyYou might be able to improve run-time performance of a C++ program by using static class members to pass an argument to a function.

In a C or C++ program, an alternative to passing an argument to a function is to have the variable defined as being global and to have the function use the global variable.

Note:
Using more global variables increases the amount of work that has to be done at activation group startup to allocate and initialize the global variables, which can inhibit optimization.

For information about class member functions and global variables, see:


[ Top of Page | Previous Page | Next Page | Table of Contents ]