-
Recent Posts
Recent Comments
- erotik on gcc build error: undefined _Unwind_Ptr
- john dresler on Install Stereo for 2007 Dodge Grand Caravan
- kitchen granite countertops on Populate and serialize text options (Java and C++)
- remodeling Reasons on Populate and serialize text options (Java and C++)
- Wes on Install Stereo for 2007 Dodge Grand Caravan
Archives
Categories
Meta
Tag Archives: c++
Passing class member function as argument
Here is one example: Declaration: class CDifferentialFFT : public CDifferential { … double benchmark(void (CDifferential::*) (float*, float*, int), float* p, float* pz); … } Implementation: double CDifferentialFFT::benchmark(void (CDifferential::*func) (float*, float*, int), float* p, float* pz) { … … Continue reading
calloc for C++?
It’s recommended to use: double * data = new double[mysize]; in C++ rather than the C-way: double * data = (double *)malloc(sizeof(double)*mysize); How about the one corresponds to calloc( ) ? Short memo here: double * data = new double[mysize](); … Continue reading