template classes

hey guys i'm new at programming. i have a hw about template classes but i can't write the complete program.. i need help about my hw.

1. Template Classes:
Please write a function swap, that takes two pointers to T and swaps its values. Please write
a short program to test the template function by defining first two integers a=4 and b=7, and
defining two characters c=’a’ and c=’b’. Then please print the values of all variables on the
screen. Please apply now the swap function by passing the parameters a and b , then call the
swap function and pass the parameters c and d. Finally print a,b,c,d on the screen.

this is the question.. i understand the logic but i'm not able to write a full program
Topic archived. No new replies allowed.