如何在 omnet++(inet) 中将 IPv4Address 转换为 char?

How can I convert an IPv4Address to char in omnet++(inet)?

如何在 omnet++(inet) 中将 IPv4Address 转换为 char? 我想使用 emit() 并且我需要将 ipv4Address 转换为 emit() 可用的类型之一。

根据 definition of IPv4Address in the source code of INET v2.99.1, I would say that its str() method can provide the text representation as a std::string. If you need a char* you can call the string's c_str() method 判断。