I am trying to implement a circular buffer in my class.
If I initiate it in the init method, it works, but I wanna declare the buffer variable under private, so I can access it from anywhere inside the class:
#import "AudioKit/TPCircularBuffer.h"
class MyClass{
public:
MyClass() { //..
}
MyClass(int id, int _channels, double _sampleRate)
{
// if I uncomment the following line, it works:
// TPCircularBuffer cbuffer;
TPCircularBufferInit(&cbuffer, 2048);
}
private:
// this doesn't work:
TPCircularBuffer cbuffer;
};
Doing this leads to the following compiling error: Call to implicitly-deleted copy constructor of 'MyClass'
I don't understand?