A question on variable defination



Hi, all,

a question on the following defination:
an external function is defined as:
nmriopen(char *const filename, const int np1, const float step1,
const int np2, const float step2)

what's the difference if it is defined as:
nmriopen(char filename, int np1, float step1,
int np2, float step2)

and what if use "int *const np1" instead of "const int np1"?

Thanks!

Jing

.



Relevant Pages

  • Re: A question on variable defination
    ... nmriopen(char *const filename, const int np1, const float step1, ... const int np2, const float step2) ...
    (comp.lang.c)
  • Re: Is this legal?
    ... That it is the only way to initialise an 'const' ... | online Comeau snippet compiler. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: accessor member functions and const
    ... I want to be able to reference the returned ... const int& getValconst ... so one cannot modify the object via the reference. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: const bei Parametern egal?
    ... void bar (const int i); ... hatte ich eigentlich eine Compiler-Fehlermeldung wegen des fehlenden const in der Definition von foo::barerwartet. ... the const and volatile typespecifiers ... for each parameter type are ignored ...
    (microsoft.public.de.vc)
  • Re: problem about const member in a struct
    ... if I declared a struct like following: ... the compiler ascertain the value of the const member? ... const int birth_year; ...
    (comp.lang.c)