I have created a class, which reference some members as smart pointers, I want to create an array of this class but I get different types of errors
class ConnectionType : public SimpleRefCount<ConnectionType> {
public:
Ptr<Socket> txMstrSocPtr; /// Pointer to Master tx socket
Ptr<Socket> rxMstrSocPtr; /// Pointer to Master rx socket
Ptr<Socket> txSlavSocPtr; /// Pointer to Slave tx socket
Ptr<Socket> rxSlavSocPtr; /// Pointer to Slave rx socket
//ConnectionType();
//~ConnectionType();
void rxMstrCallBack(Ptr<Socket> socket);
void rxSlavCallBack(Ptr<Socket> socket);
};
Ptr<ConnectionType> ConnectionArray[NUMBER_OF_CONNECTIONS] = CreateObject<ConnectionType>();
it gives me errors
Error 1 error C2075: 'ConnectionArray' : array initialization needs curly braces
2 IntelliSense: initialization with '{...}' expected for aggregate object
vector<Ptr<ConnectionType>>though.