RE: const_at_typedefed_type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kalugsky,

> Could you explain, please, why the compiler ignores the 'const' in the functiion 'char_const_param(const TStr name)'.

There is a huge difference between:
char const*
char* const

Your "const TStr" parameter is a char* const.

You need a char const*.  Or a char const* const will do, as well.

Change your typedef to:

typedef char const* TStr;

That will give you a char const* const as your parameter.

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux