User Tools

Site Tools


opus:fall2012:rthatch2:datapart1

data Keyword 1

Function Pointers

Definition

Function Pointers are pointers that point to the memory location of a function and can be used to call and pass arguments to said function. This can be used when you might have a few functions and only one of them needs to be called but at the time of writing the program you don't know which one needs to be called.

References

Class Pointer [C++], Data Phase 2

Definition

Holds the address of another variable.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Reference 1
  • Reference 2
  • Reference 3

Demonstration

Demonstration of the indicated keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Declaring and using a class pointer
 */
#include <iostream>
#include "class.h"
 
using namespace std;
 
int main()
{
   class variable;
   class *classPointer = &variable;
 
   int localVariable;
 
   classPointer->classSetFunction(localVariable);
 
   return(0);
}
opus/fall2012/rthatch2/datapart1.txt · Last modified: 2012/10/01 00:34 by rthatch2