On Thu, Aug 22, 2013 at 12:15:23PM +0300, sin wrote:
> > +eat(char *s, int (*p)(int), const int r) {
>
> `const int r' also does not make much sense.
> This is not idiomatic code.
I agree with you. Since r is a local variable doesn't matter if
the function modifies it (and even is better modify it instead of
using other local variable for it). I use const only when I want
show that the function is going to accept constant string which
should not be modified, like for example:
printf(const char *fmt, ...)
--
Roberto E. Vargas Caballero
----------------------------
k0ga_AT_shike2.com
http://www.shike2.com
Received on Thu Aug 22 2013 - 11:58:26 CEST