本文主要是介绍ns2中基本变量类型定义,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
以下是在文件:/ns-allinone-2.34/ns-2.34/autoconf-win32.h,中65行
typedef char int8_t;
typedef unsigned char int8_t;
typedef short int16_t;
typedef unsigned short u_int16_t;
typedef int int32_t;
typedef unsigned int u_int32_t;
typedef __int64 int64_t;
typedef unsigned __int64 u_int64_t;
以下是在文件:/ns-allinone-2.34/ns-2.34/config.h,中76行
typedef int32_t nsaddr_t;
typedef int32_t nsmask_t;
struct ns_addr_t {
int32_t addr_;
int32_t port_;
//以下可不用管
#ifdef __cplusplus
bool isEqual (ns_addr_t const &o) {
return ((addr_ == o.addr_) && (port_ == o.port_))?true:false;
}
#endif
};
typedef char int8_t;
typedef unsigned char int8_t;
typedef short int16_t;
typedef unsigned short u_int16_t;
typedef int int32_t;
typedef unsigned int u_int32_t;
typedef __int64 int64_t;
typedef unsigned __int64 u_int64_t;
以下是在文件:/ns-allinone-2.34/ns-2.34/config.h,中76行
typedef int32_t nsaddr_t;
typedef int32_t nsmask_t;
struct ns_addr_t {
//以下可不用管
#ifdef __cplusplus
#endif
};
这篇关于ns2中基本变量类型定义的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!