the warning comes is as

warning: passing argument 1 of ‘foo’ from incompatible pointer type


foo expects a constant char** but it is not the case...hence warning is
displayed.......

remove the const keyword.....you'll see no warning !!

--


Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad




On Sat, Jul 30, 2011 at 5:30 PM, kartik sachan <kartik.sac...@gmail.com>wrote:

>
> #include <stdio.h>
>   void foo(const char **p) { }
>   int main(int argc, char **argv)
>   {
>           foo(argv);
>           return 0;
>   }
>
> why the above code giving me warning can body explain me??
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to