warning C4706 (assignment within conditional expression) can report the
problem you describe.
Since it is a level 4 warning, you can see this warning if you compile with
/W4.
To see this elevate this warning to a level 1 warning, you can use /w14703.
To treat this warning as en error you can use /we4703
Marcus
> Hi,
>
[quoted text clipped - 6 lines]
> Thanks
> Milan
Bruno van Dooren - 29 Apr 2006 17:25 GMT
> Since it is a level 4 warning, you can see this warning if you compile
> with /W4.
> To see this elevate this warning to a level 1 warning, you can use
> /w14703.
> To treat this warning as en error you can use /we4703
Additionally, if you go to your project properties, then to configuration
properties -> C++ -> general
you can set the global warning level, and the global 'treat warnings as
errors' flag.
I have recently taken to compile all new projects with /W4 and all warnings
treated as error.
This way I can avoid typo bugs like the one you mentioned.

Signature
Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@hotmail.com
Remove only "_nos_pam"
MB- [Sat, 29 Apr 2006 08:40:02 -0700]:
>if(locationID = 10351) is passing, but I want an error fired
Use (or rather, don't)
if (10351 = locationID)
and you won't have to worry about it. Try
it, you'll like it.