am new to C++ trying to create a dynamic instance of my class Genie & having issues, not sure what i'm doin wrong, help? Created in Codeblocks & these are the compiler errors I get.
Genie.h|12|error: ISO C++ forbids declaration of `Cinreader' with no type|
Genie.h|12|error: expected `;' before '*' token|
Genie.h|13|error: `new' cannot appear in a constant-expression|
Genie.h|13|error: ISO C++ forbids declaration of `reader' with no type|
Genie.h|13|error: ISO C++ forbids initialization of member `reader'|
Genie.h|13|error: making `reader' static|
Genie.h|13|error: ISO C++ forbids in-class initialization of non-const static member `reader'|
Genie.h|14|error: ISO C++ forbids declaration of `reader' with no type|
Genie.h|14|error: expected `;' before '->' token|
Genie.h|31|error: expected unqualified-id before "delete"|
Not sure how the topic title and your question correlate, but in any case you misspelled CinReader in line 12.
Edit: looks like that's not all. You can't just dump code inside a class declaration. "reader = new CinReader;reader -> readString();" looks like it should go into the constructor and "delete reader;" should go into the destructor.
You also should not write Genie::tipMeal inside the class declaration.
Do NOT use using namespace in headers. It's fine if you want to use it in your own source files, but you should not force it on the users of your class.