extern arrays and pointers Saturday 17th November 2007 No Comments
Quick, what’s the difference!
extern char data[];
extern char *data;
Well the first one’s and array and the second one is a pointer. You can treat them in the same way, but they are completely different things.
Here’s a function which looks the same with both declarations of data:
char f(int a)
{
return data[a];
}
But if data [...]