I am really screwed up! What's wrong here?Code:char foooo()[10]
{
static char a[10];
return a;
}
Printable View
I am really screwed up! What's wrong here?Code:char foooo()[10]
{
static char a[10];
return a;
}
More like:
Though have you considered encapsulating this in a class instead?Code:char* foooo()
{
static char a[10];
return a;
}
so this was a syntax error? really?
when i write it like this:
my compiler reports that the function returns array! i am using MSVS .Net 2003.Code:char foooo()[10]
{
}
I think the problem is that functions cannot return arrays. They can, however, return pointers to arrays.