Sha256: e630f5ca1ef765838b1f6e1225b0236d3d2d183e1628df2b57f5199455623102
Contents?: true
Size: 441 Bytes
Versions: 10
Compression:
Stored size: 441 Bytes
Contents
#ifndef __FUNC_POINTERS_CLASS_H__ #define __FUNC_POINTERS_CLASS_H__ namespace function_pointers_class { // With argument and returns a value typedef int(*Callback) (int num); class PointerTest { public: PointerTest() {} void setCallback(Callback cb) { mCallback = cb; } int callCallback(int num) { return mCallback(num); } private: Callback mCallback; }; } #endif
Version data entries
10 entries across 10 versions & 1 rubygems