Home

hi,

I am facing compilation error for following snippet:


Compilation Error:
t7.cc:17: error: expected `)' before '*' token


<code snippet>
#include <iostream>

template <typename Element>
class Sort
{
public:
class Info
{
public:
Info() {}
};

public:
=========== Error Line.
Error seems to occur only when we try to use pointer/reference to Info
class. Shockingly, if this pointer is second parameter error vanishes.
(Sort(uint32_t i, Sort<Element>::Info* pInfo) works)
Sort(Sort<Element>::Info* pInfo) {}
};

int main()
{

}
</code snippet>

previous
next

Re: which language allows you to change an argument's value?
Re: status of Programming by Contract (PEP 316)?
Registering a python function in C
Re: Is it possible to catch an exception raised by a member variable?
Re: shared memory pointer
Fundacja Sloneczko
Fundacja Hobbit
Dzieci Niczyje
Fundacja Avalon
Pajacyk