I'm trying to run an structure that one of the atributes is another structure, but I keep getting the error "does not name a type" and I'm not sure how to solve it.
Palabra.c
#include "palabra.h"
#include <stdlib.h>
struct nodoPalabra{
Cadena contenido;
nodoPalabra* sigPal;
};
Palabra.h
#ifndef PALABRA_H
#define PALABRA_H
#include "diccionario.h"
#include "editor.h"
#include "linea.h"
typedef struct nodoPalabra * Palabra;
Linea.c
#include "linea.h"
#include "palabra.h"
#include <stdlib.h>
#include<iostream>
struct nodoLinea{
nodoLinea* sigLin;
Palabra priPalab;
};
Linea.h
#ifndef LINEA_H
#define LINEA_H
#include "editor.h"
#include "diccionario.h"
#include "palabra.h"
typedef struct nodoLinea * Linea;
Editor.h
#ifndef EDITOR_H
#define EDITOR_H
enum _retorno{
OK, ERROR, NO_IMPLEMENTADA
};
typedef enum _retorno TipoRetorno;
typedef unsigned int Posicion;
typedef char* Cadena;
#endif
I might be doing something wrong, but I've tried a lot of ways to solve it and wasn't able to fix it.