I want to add a variable in a message header so I used unit8_t
to define them but when I want to read this variable I need to cast it in double I did:
hello.positionx = unit8_t (m_ipv4->GetObject<MobilityModel> ()->Get开发者_开发问答Position ().x);
hello.positiony = unit8_t (m_ipv4->GetObject<MobilityModel> ()->GetPosition ().y);
as you can see these lines are similar but when I run my program it shows an error in second line which : unit8_t
in not defined in this scope
#include"stdint.h"
I don't know, what's the meaning of this error. I will be thankful if you help me .
The name of the type is uint8_t
, which stands for "unsigned integer, 8 bits wide". You seem to have mistyped it.
精彩评论