non-trivial designated initializers not supported

前端 未结 6 1614
隐瞒了意图╮
隐瞒了意图╮ 2020-12-24 04:23

I have a structure as follows:

struct app_data
{
    int port;
    int ib_port;
    unsigned size;
    int tx_depth;
    int sockfd;
    char *servername;
           


        
6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-24 05:16

    Since none of the other approaches worked for me with the Arduino IDE, I decided to simply set each field separately:

    struct app_data data;
    
    data.port = 18515;
    data.ib_port = 1;
    data.size = 65536;
    data.tx_depth = 100;
    data.sockfd = -1;
    data.servername = NULL;
    data.remote_connection = NULL;
    data.ib_dev = NULL;
    

提交回复
热议问题