They don't have to. They can be created inside any scope - that includes outside functions, inside functions, inside classes, inside a class' member function, inside a for loop, etc.
Thanks LB,
but the first thing i have to do is to create a List class with the following two interface:
List::addItem //add an item to the list
List::getTheLargestValue //find the largest value stored in the list
the largest value among the integers i want to store in the list
the node i want to create is to store those integers
getNextNode() needs to be public.
that cout statement doesn't belong in the direct scope of a class, not does the function T &printValue(void); exist.
List class does not exist.
List getLargestNode(void) does not exist
Class Next does not exist
Next *operator*(const List &, const List &) does not exist
Using inheritance, i have a base class and two derived classes. One derived class is to insert an integer, the other derived class is to insert a character. I need help writing this code.