help writing functions

can someone please help me write these functions, i have looked online and i am having trouble finding how to write them. Thanks

class List
{

private:
int *a;
int count;
int capacity;


public:
List(); // create an empty list with capacity 0
List(int n); // create a list with capacity n
List(List l); // create a list similar to passed object l
~List(); // de-allocates memory from the list
void AddElement(int v); //add a number at the end of the list
void AddElement(int v,int p); // insert a number v at position p
void Sort(); // sorts all the numbers in the list
int *Retrieve(); // returns the pointer of “a”
List operator++(); // increate all the numbers in the list by 1
List operator--(); // decrease all the numbers in the list by 1
List operator+(int n); // increase all the numbers in the list by n
List operator-(int n); // decrease all the numbers in the list by n
List operator=(List l); // creates a duplicate list of l
friend List Combine(List l1,List l2); // creates and returns a new list, merging L1 and L2, so that the numbers in new list is sorted
}


------------------------------------------------------------------------------

List :: List()
{


}
List :: List(int n)
{


}

List :: List(List l)
{


}

List :: ~List()
{


}

void List :: AddElement(int v)
{


}

void List :: AddElement(int v,int p)
{


}

void List :: Sort()
{


}

int *Retrieve()
{


}

List List :: operator++()
{


}

List List :: operator--()
{


}

List List :: operator+(int n)
{


}

List List :: operator-(int n)
{


}

List List :: operator=(List l)
{


}

List Combine(List l1,List l2)
{


}
Nobody is going to write them for you. If you're willing to put some effort into it, http://www.cplusplus.com/doc/tutorial/dynamic/ should get you started.
@jazzyjely:
i dont understand int capacity variable use what to do ?
if class of excieric is:
1
2
3
4
5
class List 
{
    int *a;
 int count ;
}

i will help you !
Topic archived. No new replies allowed.