G
Gianni Mariani
aki said://defined in header file
struct authProt
{
uint8_t type;
uint8_t length;
uint16_t authprot;
};
//in main file
authProt ap;
----
----
memberfun();
// In memberfunc()
ap.type=1; // there is segmentaion fault here i do not know why?
any comments please?
It appears the C++ code is correct - this would be a platform specific
issue. At a guess, it could be a name collission (is there anything
else named ap?). Try changing it's name (ap).