Re: warning in main.m
Re: warning in main.m
- Subject: Re: warning in main.m
- From: Dick Rucker <email@hidden>
- Date: Fri, 02 Jan 2004 08:49:02 -0500
on 1/1/04 9:17 PM, matt neuburg at email@hidden wrote:
> Actually, it's worse than I thought. None of my older projects ("older" means
> created before the 1.1 upgrade was applied) has this problem! That's because
> *their* main.m declares main like this:
>
> int main(int argc, const char *argv[])
>
> But *now* whenever I create a project, its main.m declares main like this:
>
> int main(int argc, char *argv[])
>
> So, the problem is not that gcc changed. It's that main.m changed. And it
> changed from being right to being wrong
I'm a newbie to Objective C, and to C for that matter, so this may be a dumb
question, but what is being declared here? Is it
(1) a variable array whose name is "argv[]" and whose type is
"const char *", as in "constant character pointer"?
or is it
(2) a variable array whose de-referenced name is "*argv[]" and whose type is
"const char"?
If it is the first, which I think it is, then shouldn't the template for
main's declaration put a space between the asterisk and the variable name,
like this?
int main(int argc, const char * argv[])
Dick
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.