I'm trying to compile a program that sets a pointer to a pointer to pointer to a pointer to a pointer to a pointer to a pointer to a pointer to a pointer. (9 times)
I've tried removing chunks of code and adding putchar and printf instead of write. I also tried to include stdio.h library, but it wont compile. I still don't understand pointers very well.
#include<stdio.h> // Adding a library here
void ft_ultimate_ft(int *********nbr); // Defining the ultimate function
int main(void)
{
*nbr [9], // Defining the array for all pointers
*nbr[0] = 42 // Defining the final destination
*nbr[1] = &nbr[0]
*nbr[2] = &nbr[1]
*nbr[3] = &nbr[2]
*nbr[4] = &nbr[3]
*nbr[5] = &nbr[4]
*nbr[6] = &nbr[5]
*nbr[7] = &nbr[6]
*nbr[8] = &nbr[7]
write(1, *nbr[8], 1);
return(0);
}
I expected to get simply a 42, but got this error code instead. ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)