Re: const and standard types

From: cppsks (sksjava_at_hotmail.com)
Date: 08/28/04


Date: Fri, 27 Aug 2004 23:16:05 -0500


"Siemel Naran" <SiemelNaran@REMOVE.att.net> wrote in message
news:imcXc.516998$Gx4.305093@bgtnsc04-news.ops.worldnet.att.net...
> "cppsks" <sksjava@hotmail.com> wrote in message
> news:cgipa9$203$1@news.lsil.com...

> If you have a function and it receives a variable by value, but in the
> function definition you declare the value const, that's another story. Is
> this what you're asking about?
>
> void f(int);
> void f(const int i) {
> ...
> }
>
>

Thanks for the response to all. Just a quick question about the above
declartion and definition.
What does the above convention mean?

Thanks,

skscpp



Relevant Pages

  • Re: Comments on my code?
    ... Since you didn't declare the argument type, ... you're passing an argument of type int. ... void *malloc; ... declaration of malloc falls in the same category as f2, ...
    (comp.lang.c)
  • Using GLM to load an object
    ... following code I cannot figure out how to declare a color for the model ... int curx, cury; ... void display ... glutAddMenuEntry; ...
    (comp.graphics.api.opengl)
  • Re: Function pointer arguments
    ... void test; ... int main ... It's because you have declared the type of fp to "pointer to a ... When you declare a function or pointer to function with an empty ...
    (comp.lang.c)
  • Re: Function definition with empty parameters list
    ... /* Function definition with empty parameters list hence testhas no ... int main ... as 'void test...' ... undefined behavior, ...
    (comp.lang.c)
  • Re: which is const in "char *const argv[]"
    ... cdecl seems no much help, ... declare main as function (void) returning int ... declare signal as function ...
    (comp.lang.c)