Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why doesn my protocol woth with NesCT & OMNeT++ even though it compiles to an executable?

0
Posted

Why doesn my protocol woth with NesCT & OMNeT++ even though it compiles to an executable?

0

This is usually caused by the usage of uninitialized variables. GCC fills all the memory with 0 before starting an application; whereas, MS compilers fill the memory with 0xCD. In this case, your variables will have the value of 0xcd or 0xcdcd depending on the type of variable. The solution for this is not to depend on compiler for variable initializations and do custom initialization inside your init functions. Another strategy would be to assign 0 to all variables you declare. Then, NesCT would also initialize them during class construction.

Related Questions

Thanksgiving questions

*Sadly, we had to bring back ads too. Hopefully more targeted.