Using TypeDef

Mar 18, 2009 at 4:40pm
I am to be writing a program for class but kind of stuck at the beginning.. i have..

p3.cpp which includes these two:

Media3.h
List3.h

List3.h includes item3.h

Part of my instructions are, "3. Create item3.h to connect ItemType to MediaClass"

MediaClass is involved in Media3.h .... I am not too sure on how to do this??
I was trying
TypeDef MediaClass item;

but that didn't seem to work.. not to sure what to do.. Any help is greatly appreciated! ^_^
Mar 18, 2009 at 5:10pm
typedef is lowercase. remember that C++ is case sensitive:

1
2
3
typedef MediaClass item;
// or
typedef MediaClass ItemType;


should both work, provided MediaClass is declared at the time.
Last edited on Mar 18, 2009 at 5:10pm
Mar 18, 2009 at 5:41pm
OH! forgot about that.. thanks :D it worked :)
Topic archived. No new replies allowed.