CRect Size function act strange ?
Danny Lauwers -- dlauwers@innet.be
Monday, June 17, 1996
NT4b2/MFC4/VC++4.1
When I use the following code in my program I always get the C2274 error,
but I found the same use in the MFC-code itself ?? Al I doing something
wrong here !!
I did update to the 4.1a patch I found on the Microsoft site. And I am using
some OLE controls and ASPI-DLL stuff is loaded in a class.
CRect dstCRect;
CSize dstSize;
dstSize = dstCRect.Size();
error C2274: 'function-style cast' : illegal as right side of '.' operator
Thanks
Danny Lauwers
==========================================================
Ing. Danny Lauwers (dlauwers@innet.be)
Intersoft Electronics
Lammerdries 27
2250 Olen Belgium Europe
Tel: +32 14 231811
Fax: +32 14 231944
----------------------------------------------------------
Radar verification Hard- & software
Fotofinish and timing of sportevents
Footscan applications
and more ...
==========================================================
Niels Ull Jacobsen -- nuj@kruger.dk
Wednesday, June 19, 1996
[Mini-digest: 2 responses]
At 22:50 17-06-96 +0200, you wrote:
>NT4b2/MFC4/VC++4.1
>
>
>When I use the following code in my program I always get the C2274 error=
,
>but I found the same use in the MFC-code itself ?? Al I doing something
>wrong here !!
>I did update to the 4.1a patch I found on the Microsoft site. And I am u=
sing
>some OLE controls and ASPI-DLL stuff is loaded in a class.
>
>CRect dstCRect;
>CSize dstSize;
>
>dstSize =3D dstCRect.Size();
This is certainly valid code and compiles fine on my box.
>error C2274: 'function-style cast' : illegal as right side of '.' operat=
or
It sounds like something is #define'ing Size?=20
Check if this is the case with a
#ifdef Size
#error Size is redefined
#endif
If this is the case, start searching your header files.
>
>
>Thanks
>Danny Lauwers
>
Niels Ull Jacobsen, Kr=FCger A/S (nuj@kruger.dk)
Everything stated herein is THE OFFICIAL POLICY of the entire Kruger=20
group and should be taken as legally binding in every respect.=20
Pigs will grow wings and fly.
-----From: Marty Fried
I pasted that code into a sourcefile and it compiled without error, even
at the highest warning level, which is what I expected. Are you sure you're
including the right .h files (stdafx.h?). Maybe your precompiled headers are
corrupted, somehow, or not present. The code itself is not the problem.
| Вернуться в корень Архива
|