c++ - Errors when accessing enums from a header file -
I am trying to access enums from a header file in c ++ and I'm getting errors, I think this is wrong.
When I compile the program, I find errors in saying that my areas were not declared in this scope.
E.g. "Error: Basic was not declared in this scope error:" PEPE "was not declared in this scope"
tokenizer.h
typingfed structure { char * start; Enum {original, single_QUOTE, DOUBLE_QUOTE, pipe, semicolon, EOL, error} type; } a token; simpleshell.cpp
zero process line (four * line) {enum {CMD, PIPEDMMD, ARGS} processor mode; ProcessSmod = CMD; Description * stmt = newStatement (); // Store the current command command * cmd = NULL; Int doneFlag = 0; Four * expanded token = faucet; startToken (line); A token response; answer = getNextToken (); While (! DoneFlag) {Switch (Answer Type) {Case Error: ... // Return Some Code; ... // Other case statement case PIPE: ... // break some code; Case EOL: doneFlag = 1; Default: fprintf (stderr, "Programming error: unfamiliar type returned !!! \ n"); If (CMD! = Null) {free commodity (CMD); CMD = Faucet; } If (stmt! = NULL) {Freestation (STMT); Stmt = NULL; } Return; } answer = getNextToken (); }}
You can call it as aToken :: BASIC , aToken :: PIPE , etc. enum to aToken .
Comments
Post a Comment