S
Saad
Hi All,
Im using managed c++ syntax (VS 7) in VS 2005. And i want to implement
a generic interface in it.
But im getting errors when i try to compile the code.
Here is what i want to do:-
Like if you have following in C#:-
public interface IFace<T>
{
void FuncA(T obj);
}
Then how to write it in managed c++.
I tried with this:-
generic<typename T>
public __gc__interface IFace
{
public:
void FuncA(T obj);
}
But im getting the following error:-
error c2143: syntax error : missing ';' before '<'
So, please let me know what is the issue here?
Im assuming that we can implement generic interface in managed C++,
since i have also used generic collections in the project as
well....or my assumption is wrong?
Thanks,
Saad
Im using managed c++ syntax (VS 7) in VS 2005. And i want to implement
a generic interface in it.
But im getting errors when i try to compile the code.
Here is what i want to do:-
Like if you have following in C#:-
public interface IFace<T>
{
void FuncA(T obj);
}
Then how to write it in managed c++.
I tried with this:-
generic<typename T>
public __gc__interface IFace
{
public:
void FuncA(T obj);
}
But im getting the following error:-
error c2143: syntax error : missing ';' before '<'
So, please let me know what is the issue here?
Im assuming that we can implement generic interface in managed C++,
since i have also used generic collections in the project as
well....or my assumption is wrong?
Thanks,
Saad