const function() !!??
From: Sundar (sundar_sacet_at_yahoo.com)
Date: 12/30/04
- Next message: Eric Sosman: "[OT] Re: Name help needed"
- Previous message: Lawrence Kirby: "Re: gcc: error: case label does not reduce to an integer constant"
- Next in thread: dandelion: "Re: const function() !!??"
- Reply: dandelion: "Re: const function() !!??"
- Reply: Emmanuel Delahaye: "Re: const function() !!??"
- Reply: Andrey Tarasevich: "Re: const function() !!??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Dec 2004 05:44:44 -0800
Do we have something called a const function ? I thought applying the
'const' specifier to a function is meaningless... but when i tried
defining a const function it worked !!
like...
const int func(int a)
{
int b;
.....
return b;
}
...The above code gave no compilation errors ! :->
How should i interpret it ?
(i used MS- vc++ compiler)
Sundar
- Next message: Eric Sosman: "[OT] Re: Name help needed"
- Previous message: Lawrence Kirby: "Re: gcc: error: case label does not reduce to an integer constant"
- Next in thread: dandelion: "Re: const function() !!??"
- Reply: dandelion: "Re: const function() !!??"
- Reply: Emmanuel Delahaye: "Re: const function() !!??"
- Reply: Andrey Tarasevich: "Re: const function() !!??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]