Hi, I'm trying to declare a pointers value inside of a function, and then manipulate that data the pointer points to. This is the test program I compiled and like the original it gives the error "undeclared identifier". At both occurrences of *somevar
in the build function. Thank you for your time.
int main()
{
int len; char *somevar;
len = build(&somevar);
}
int build(char **othervar)
{
int tlen = 10;
*somevar = (char*)malloc(tlen*sizeof(char));
*somevar = {"something"};
}