| Subject: | Re: Implementation-defined behaviour |
|---|---|
| From: | Ioannis Vranos |
| Date: | Fri, 28 Mar 2008 16:51:32 +0200 |
| Newsgroups: | comp.lang.c |
Kenny McCormack wrote:
>
> And:
>
> 1) How to declare main() { Always a hit! }
Easy. Under C90:
int main(), int main(void), int main(int argc, char *argv[]), int
main(int argc, char **argv), and those also with no return type
(implicit int).
> 2) Why not to cast the return value of *alloc()
>
> That's it folks. Enjoy!
malloc() doesn't need a cast in C, it needs in C++, because in C there
is implicit conversion of void * to any other pointer type, but not in
C++ where it requires a cast.
|
| Previous by Date: | Re: Doubts about pointers, dj3vande |
|---|---|
| Next by Date: | error handlling in C, broli |
| Previous by Thread: | Re: Implementation-defined behaviour, Kenny McCormack |
| Next by Thread: | Re: Implementation-defined behaviour, Richard |
| Indexes: | [Date] [Thread] [Top] [All Lists] |