Normally when asking questions, you should supply a bit more code and
compiler error output to make the day a bit simpler for us.
Anyway, when creating a template, you must have a space between the two >
characters.
Note that > is one C/C++ keyword, while >> is another, so if you forget
the space in the template declaration, you will always get into trouble.
In this case, the compiler is correct - your program is not correct. That
is a quite common case. Just about _always_ the error is in the code, not
in the compilers.
Write like this:
MaxHeap<Array<int> > m;
/Per W
On Sat, 3 Sep 2005, bhadram rao wrote:
> Dear friends,
> I need help. if i'm created template initialization like this its is not working in vc++ compiler. Program is correct but compiler is saying that there is no comma before m etc.. How to solve the problem. Please help me in giving the solution.
>
> Thanking you,
>
> yours sincerely,
> bhadram
|