C
Chad
I thought I could assign an array of chars to a pointer to pointer.
However, when I do
the following:
#include <stdio.h>
int main(void) {
char buff[] ="test";
char **output = &buff;
return 0;
}
I get:
$gcc -g ptr.c -o ptr
ptr.c: In function `main':
ptr.c:5: warning: initialization from incompatible pointer type
What am I doing wrong here?
Chad
However, when I do
the following:
#include <stdio.h>
int main(void) {
char buff[] ="test";
char **output = &buff;
return 0;
}
I get:
$gcc -g ptr.c -o ptr
ptr.c: In function `main':
ptr.c:5: warning: initialization from incompatible pointer type
What am I doing wrong here?
Chad