ID Number: Q83870
7.00
MS-DOS
docerr
Summary:
SYMPTOMS
The code fragment for the online help for "Functions based in a
Segment" for Microsoft C/C++ version 7.0 is missing a parenthesis.
The code fragment that appears in the online help is:
// FILE 2 - compiled under large model
void __near __based(__segname("MYSEG") nearfunc()
{
// ...
}
Compiling the sample code gives the following error:
C2061: syntax error : identifier 'nearfunc'
RESOLUTION
To resolve the error, change the line of code for FILE2 from
void __near __based(__segname("MYSEG") nearfunc()
to the following:
void __near __based(__segname("MYSEG")) nearfunc()
More Information:
The above sample illustrates how to use the __based keyword to place a
function into the given segment. To access this area of the online
help, search for help on the __based keyword and then select
"Functions Based in a Segment."
Additional reference words: 7.00