RE: Conversion from GCC C++ to Visual C++

From: Dranoel (Dranoel_at_discussions.microsoft.com)
Date: 07/28/04


Date: Wed, 28 Jul 2004 14:51:03 -0700

Correction to my examples:

The orignal code in Vector.h was (I had gotten it to accept with several program modifications and failed to remove everthing I had put in):

void clear() { for (int i=0; i<n; i++) v[i] = 0; } // only for number arrays

The typoe of error generated is:

C:\...\Vector.h(58) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'const int' (or there is no acceptable conversion)
C:\...\Vector.h(58) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'const int' (or there is no acceptable conversion)
C:\...\MiscVector.cpp(310) : error C2665: 'readPtSet' : none of the 2 overloads can convert parameter 2 from type 'class Array<class Vec2<float> >'
C:\...\MiscVector.cpp(381) : error C2784: 'template-parameter-1 __cdecl fabs(class Array<`template-parameter-1'>)' : could not deduce template argument for 'class Array<`template-parameter-1'>' from 'float'
C:\...\MiscVector.cpp(381) : error C2784: 'template-parameter-1 __cdecl fabs(class Array<`template-parameter-1'>)' : could not deduce template argument for 'class Array<`template-parameter-1'>' from 'float'
C:\...\MiscVector.cpp(610) : error C2784: 'template-parameter-1 __cdecl fabs(class Array<`template-parameter-1'>)' : could not deduce template argument for 'class Array<

But I do not need a "correction", I need a common solution for all the incompatibilities. I do not expect it to come easily; hence, I am looking for a source that discusses gcc->VC++ conversion issues.