我寻找它是因为我的服务器协议有一些数据类型,所以我需要实现它们的类,并将它们转换为字节。这就是我所做的,它产生了错误:#define _PACKET_DATA_TYPES class mcp_t::int { //ERROR: expected an identifier
}如果这是不可能的,命名空间在这里似乎有点无用--无论如何我都将被迫使用mcp_int。
基本上,我想引用tMemo名称mcpx,而不是像下面这样直接引用对象名称: if x= 2 then mcp2.Lines.Append(inttostr(cp[x]));
if x = 3 then mcp3.Lines.Append(inttostr(cp[x]));if x = 4 then mcp4.Lines.Append(inttostr(cp[x]))
/gtest_mcp23s17.cpp:25:52: error: no type named 'HW_ADDR_6' in 'mcp23s17::HardwareAddress' TC_mcp23s17_gpio_x(mcp23s17::HardwareAddress::HW_ADDR_6); ~~~~~~~~~~~~~~~~~~~~~~~~~~~^进行编译Test (泛型)编译
TEST(Construction,