D
Denis Remezov
Il said:Greetings to everyone, this is my odd (probably trivial) question:
i defined that thing, like gobal var
...
int y1 = 0;
...
and at compile time i got
...
C:\Dati\Luigi\Progetti\provec++\plasma\SetPixel.cpp(42) : error C2373: 'y1'
: redefinition; different type modifiers
c:\programmi\microsoft visual studio\vc98\include\math.h(435) : see
declaration of 'y1'
...
then looked at the corresponding line in math.h, that is
...
_CRTIMP double __cdecl y1(double);
...
And i dont have any math.h include around.
Any hint? I'm under VC6, if it helps...
Thank to everyone who will reply me.
Luigi.
Bessel functions j0, j1, jn, y0, y1, yn are quite common, not only
with MS libraries. Some other header included <math.h>, where they
were declared; e.g., <iostream> does that for me.
It pays to just avoid using simple short names like the above in the
/global scope/ (actually, any names if there is no good reason to the
contrary). Put them into a namespace; an unnamed namespace if you
only need them in a given unit.
Denis