Using a struct in a header file “unknown type” error

后端 未结 3 1026
夕颜
夕颜 2021-02-05 12:20

I am using Kdevelop in Kubuntu. I have declared a structure in my datasetup.h file:

#ifndef A_H
#define A_H

struct georeg_val {

    int p;
    double h;
    do         


        
3条回答
  •  太阳男子
    2021-02-05 13:25

    If you have to define a new type, you have to write:

    typedef struct {
    
        int p;
        double h;
        double hfov;
        double vfov;
    } georeg_val ;
    

    Then you can use georeg_val as a new type.

提交回复
热议问题