@powersoffour but the example is something you would see if you tried to learn the language by trial and error. It reminds me a little bit of the question about trying to compile a PNG file in that the problem is someone using the language without knowing the fundamentals. Otherwise we can imagine many other similarly confused questions: A very common one is
void f(char *s) {
s = malloc .......
}
followed by asking why calling the function doesn't modify its parameter. How do you tell someone this without teaching them how pointers work?
void f(char *s) {
s = malloc .......
}
followed by asking why calling the function doesn't modify its parameter. How do you tell someone this without teaching them how pointers work?