using const & in function prototypes
- From: Tommy <tommy767@xxxxxxxxx>
- Date: Thu, 06 Nov 2008 00:07:02 -0500
Folks,
I am probably getting an unreasonable doubt with the VC8 compiler, so before I go overboard with details and background, I would like to ask this simple C/C++ question:
In code where I might have:
BOOL func(DWORD ref);
changing this to:
BOOL func(const TINT &ref);
where TINT is
#define TINT DWORD
Is there something I should be aware under the current VC8+ compilers or I should "watch for" or be aware of when using this syntax that might possible change logic in my function code block?
Of course, this is only done if the function code block is not changing the variable which the new compiler would catch and error out such logic where an attempt was made to change a const variable.
I ran into a situation where the only difference is the above and I am getting different unexpected results. So before digging deeper to see whats happening, was I correct in my long time thinking that the above syntax was ok and proper?
Thanks
===
.
- Follow-Ups:
- Re: using const & in function prototypes
- From: Hendrik Schober
- Re: using const & in function prototypes
- From: Ulrich Eckhardt
- Re: using const & in function prototypes
- From: Tommy
- Re: using const & in function prototypes
- Prev by Date: problem with old name project files
- Next by Date: Re: using const & in function prototypes
- Previous by thread: problem with old name project files
- Next by thread: Re: using const & in function prototypes
- Index(es):
Relevant Pages
|
Loading