structure - Returning structs inside a class -


I am converting my application into an OOP type, but I am having problems with the support function.

This is for my .cpp file

  section_t XIniFile: : * AddSection (ini_file_t * n, char) for a function "addSection" D) {section_t * s = (section_t *) malloc (sizeof (section_t *); // add section; return s;}   

This is for my .h file

  class XIniFile {public: int open *; int readString (const char *, const char *, char *); Int readInt (const char *, const char *, int *); int writeString (Const char *, const char *, char *); int writeInt (const char *, const char *, int *); int close (); Private: typedef struct key_tag {char * n Ame; char * value; key_tag * next;} key_tag_t; typedef struct sections_tag {four * names; sections_tag * next; key_tag_t * key;} section_t; typedef struct {four * names; section_t * squares; modified int;} ini_file_t; section_t * Add_section (* ini_file_t, four *); Key_tag_t * add_key (section_t *, char *, char *);}   

There are many errors but I would like to start with the first error Which is error: a ???? Section_tate Do not have a type of name

Turn add_section in:

  XIniFile :: section_t * XIniFile :: add_section (ini_file_t * n, char * d)   

Since section_t is a member of XIniFile

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -