Pointer and function pointer
// AllPointFunc1.cpp: defines the entry point of the console application. // # Include "stdafx. h "# include <iostream> using namespace std; // pointer function int * func1 (int I) {return & I;} // The same int * func2 (int I) as func1) {return & I;} // pointer function int * func3 (int * I) {return I;} // common function int func4 (int I) {return ++ I ;} int main () {int k = 3; cout <"\ n ====\ tfunc1 \ t ====" <endl; cout <"func1 (k):" <func1 (k) <"\ n * func1 (k):" <* func1 (k) <endl; cout <"\ n =====\ tfunc2 \ t ====" <endl; cout <"func2 (k ): "<func2 (k) <" \ n * func2 (k): "<* func2 (k) <endl; cout <"\ n =====\ tfunc3 \ t ====" <endl; cout <"func3 (k ): "<func3 (& k) <" \ n * func (3): "<* func3 (& k) <endl; cout <"\ n =====\ tfunc4 \ t ====" <endl; cout <"(* func4) (k ): "<(* func4) (k) <\ nfunc4 (k):" <func4 (k) <endl; // function pointer int (* Pfunc4) (int); Pfunc4 = & func4; cout <"\ n =====\ tPfunc \ t ====" <endl; cout <"(* Pfunc4) (k):" <(* Pfunc4) (k) <"\ nPfunc4 (k):" <Pfunc4 (k) <endl; return 0 ;}