home *** CD-ROM | disk | FTP | other *** search
- %F,15,COMMONC.MNU%Constructs_in_C_and_C++ / %F,15,COMMONC.6%Previous / %F,15,COMMONC.8%Next
-
-
- %C,1%Definitions within Return or Argument Types
-
- In C++, types may not be defined in return or argument types.
- ANSI C allows such definitions. For example, the declarations:
-
- %C,1%void %C,5%print%C,1%(struct %C,5%X %C,1%{ int %C,5%i%C,1%;} %C,5%x%C,1%); %C,14%// error
- %C,1%enum %C,5%nt%C,1%{%C,5%a%C,1%, %C,5%b%C,1%, %C,5%c%C,1%} %C,5% ctr%C,1%(); %C,14%// error
-
- produce errors in C++ but are valid declarations in ANSI C.
-
-