'How to correctly initialize the `pFuncton` pointer
How to correctly initialize the pFuncton pointer?
#include <iostream>
class CTest
{
public:
void Function(int);
int (*pFuncton)(int);
void Test();
};
void CTest::Function(int Int)
{
std::cout << Int;
};
void CTest::Test()
{
pFuncton = Function;
pFuncton(1);
};
int main()
{
CTest test;
test.Test();
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
