Singleton said:
what is wrong with my main fn?
void f(char** p)
{
printf("%s", p[0]);
Undefined behaviour - calling a variadic function without a function
prototype in scope. You forgot to #include <stdio.h>
}
void main()
In C, main() returns int.
{
char a[50][50];
strcpy(a[0], "hello");
You'll want <string.h> as well, then.
f(a);
f takes char **, but you're not passing a char **. In a value context, the
name of an array decays into a pointer to its first element, so a has the
type char (*)[50], which is not the same as char **.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)