Hi
I want to compile a code like this with gcc 4.3.3:
//---------------------------
class A {
public:
template< int type >
void
operator()() {
int i;
}
};
int main() {
A an_a;
an_a()<100>;
}
//--------------------
but i get the following errors:
file.cpp: In function ‘int main()’:
file.cpp:14: error: no match for call to ‘(A) ()’
file.cpp:14: error: expected primary-expression before ‘;’ token
can you tell me what is the problem?
thanks
I want to compile a code like this with gcc 4.3.3:
//---------------------------
class A {
public:
template< int type >
void
operator()() {
int i;
}
};
int main() {
A an_a;
an_a()<100>;
}
//--------------------
but i get the following errors:
file.cpp: In function ‘int main()’:
file.cpp:14: error: no match for call to ‘(A) ()’
file.cpp:14: error: expected primary-expression before ‘;’ token
can you tell me what is the problem?
thanks