Code:template <class T> T operator++(T num) { cout<<"In overload function"<<endl; return T result = num++; } int main() { int num=5; int result = operator++(num); //whats the problem with this??? }
Why does this fail to compile?
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 10 of 10
Thread: operator++ with templatesThreaded View
|
Click Here to Expand Forum to Full Width |