I tried to create a double vector of object, similar to matrix but i need to put in the row a type of object and in the column another type of object.
I used this code:
static const int dim = 3;
packet **pack = new packet[dim];
but the compiler gives me these errors:
- `new' cannot appear in a constant-expression
- ISO C++ forbids initialization of member `pack'
- making `pack' static
- invalid in-class initialization of static data member of non-integral type `packet**'
this is the definition of packet header
#ifndef _PACKET_H
#define _PACKET_H
class packet
{
public:
packet();
~packet();
int in, out;
double tempo;
double get_time();
int get_in();
int get_out();