Calling cli::array<int>::Reverse via a typedef in C++/CLI
- by Vulcan Eager
Here is what I'm trying:
typedef cli::array<int> intarray;
int main(){
intarray ^ints = gcnew intarray { 0, 1, 2, 3 };
intarray::Reverse(ints); // C2825, C2039, C3149
return 0;
}
Compilation resulted in the following errors:
.\ints.cpp(46) : error C2825: 'intarray': must be a class or namespace when followed by '::'
.\ints.cpp(46) : error C2039: 'Reverse' : is not a member of '`global namespace''
.\ints.cpp(46) : error C3149: 'cli::array<Type>' : cannot use this type here without a top-level '^'
with
[
Type=int
]
Am I doing something wrong here?