I tried it with an int too just to be sure:
Code:
class aodv_rit
{
public:
  std::vector<int> intest;
  int recvPacket(unsigned char *packet, int size);
}

int aodv_rit::recvPacket(unsigned char * packet, int size)
{
...

intest.push_back(1);
...
}
same thing happened

although I tried it like this and it worked:
Code:
int aodv_rit::recvPacket(unsigned char * packet, int size)
{
...
std::vector<int> test2;

test2.push_back(1);

std::vector<RREQ_STRUCT> rreq_test;

...
...
...
rreq_test.push_back(rreq_object);
...
}
It seems if I declare the vector in the same function where I use it it works fine. Any suggestions anybody. I am really at a loss here. Thanks a lot
Amish