ho creato questo header kiamato types.h
poi lo rikiamo in un programma, ma quando facciocodice:#ifndef TYPES #define TYPES //tipo boolean typedef short int Boolean; typedef char* String; //enumerazione enum OperatorType{BINARIO,UNARIO_PREFISSO,UNARIO_POSTFISSO}; enum Comparison{COMPLETA,NO_SPAZI}; //strutture dati struct Istruction { String istruzione; int length; }; struct Operator { String symbol; String *operandi; int length; int priority; Boolean (*function)(Operator); OperatorType ot; }; #endif
mi dice come se questi tipi nn fossero mai stati dikiaraticodice:#include <iostream> #include "types.h" #define TRUE 1 #define FALSE 0 #define OPERATORI 2 using namespace std; //prototipi Boolean Assignment(Operator); Boolean If(Istruction);
il primo file su kiama types.h
il secondo è vsl.cpp
suggerimenti?

Rispondi quotando
