在.h裏面直接對數組進行賦值,會報錯error: array used as initializer
class Eth_APP //final : public ethBase
{
public:
/// @brief Class constructor
/// @details This constructor initializes the Task parameters and
/// sets max connection and epoll timeout values.
/// @param[in] serverTask Pointer to the Ethernet router's IPC server task
//oemEthRouter();
Eth_APP();
/// @brief Class destructor
~Eth_APP(void) {};
private:
//char localIPAddressName[6] = "ens35";
/// Local IP Address string
char localIPAddress[INET_ADDRSTRLEN]; //
};
註釋掉char localIPAddressName[6] = "ens35"; 程序正常編譯。