Good Day NS-3 users,
In a part of my code, I have used strlen() function to find the length of the char* datatype. I have included string.h header file as well in the code but I come across the following error while debugging. Could someone please help me out why this error has been thrown. I have provided a partial part of my code as well below.
GoosePduHeader::Serialize (Buffer::Iterator start) const
{
uint16_t x;
Buffer::Iterator i = start;
for (x=0;x<strlen(gocbRef);x++)
{
i.WriteU8 (gocbRef[x]);
}
}
Error:
Program received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/x86_64/strlen.S:106
106 ../sysdeps/x86_64/strlen.S: No such file or directory.
Regards,
Rex