home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / TEXT / COMMONC.7 < prev    next >
Encoding:
Text File  |  1993-11-06  |  550 b   |  14 lines

  1. %F,15,COMMONC.MNU%Constructs_in_C_and_C++ / %F,15,COMMONC.6%Previous / %F,15,COMMONC.8%Next
  2.  
  3.  
  4.          %C,1%Definitions within Return or Argument Types
  5.  
  6. In C++, types may not be defined in return or argument types.
  7. ANSI C allows such definitions.  For example, the declarations:
  8.  
  9.    %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
  10.    %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
  11.  
  12. produce errors in C++ but are valid declarations in ANSI C.
  13.  
  14.