The information in this article applies to:
SYMPTOMSGiven a function template, if the return type is omitted, the error that results is a syntax error on the semicolon preceding the closing brace of the function.
RESOLUTIONSpecify a return type for the function template. STATUSThis behavior is by design. MORE INFORMATIONIn C++, it is an error for a function to be declared without a return type. This is in compliance with the proposed ANSI C++ specification (ref. ARM, section 7.1.1). Sample Code
Additional query words:
Keywords : kbCompiler kbCPPonly kbVC |
Last Reviewed: January 31, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |