question about VC++ 6

J

james

IDE can understand both C and C++ fully. I suppose you are familiar with C.
because there are lots of fault of your post. one of major difference
between C++ and C is Object feature. like as:
...Header file
class Client
{
//data member
.......
//member function
void bzero(int*res,int size);
........
}
//implement file
Client *clnt= new Client;
clnt->bzero(&res,sizeof(res));
......
 
L

Luca

Hi everybody, I have a little problem with Visual C++ 6.0
My project is a mixture of C and C++ code
I have many C functions whose definition follows the old-style, like
the following:

******************************************************************************
bool_t *
datiambientaliauto_ntfy_1(argp, clnt)
RPCST_DATI_AMB_AUTO_NTFY *argp;
CLIENT *clnt;
{
static bool_t res;

bzero(&res, sizeof(res));
if (clnt_call(clnt, datiAmbientaliAuto_ntfy,
xdr_RPCST_DATI_AMB_AUTO_NTFY, argp, xdr_bool, &res, TIMEOUT) !=
RPC_SUCCESS) {
return (NULL);
}
return (&res);
}
******************************************************************************

this old style is now considered obsolete.

The problem is that this way VC++ considers the local parameters as
being global variables instead of local; this results in the class tab
of the workspace window being full of such wrong global variables.
Do you know how can I tell the IDE to analyze correctly code of C
old-style function definition?


Thank you

Luca
 
L

lallous

Luca said:
Hi everybody, I have a little problem with Visual C++ 6.0
My project is a mixture of C and C++ code
I have many C functions whose definition follows the old-style, like
the following:

****************************************************************************
**
bool_t *
datiambientaliauto_ntfy_1(argp, clnt)
RPCST_DATI_AMB_AUTO_NTFY *argp;
CLIENT *clnt;
{
static bool_t res;

bzero(&res, sizeof(res));
if (clnt_call(clnt, datiAmbientaliAuto_ntfy,
xdr_RPCST_DATI_AMB_AUTO_NTFY, argp, xdr_bool, &res, TIMEOUT) !=
RPC_SUCCESS) {
return (NULL);
}
return (&res);
}
****************************************************************************
**

this old style is now considered obsolete.

The problem is that this way VC++ considers the local parameters as
being global variables instead of local; this results in the class tab
of the workspace window being full of such wrong global variables.
Do you know how can I tell the IDE to analyze correctly code of C
old-style function definition?


Thank you

Luca

You might want to try asking @ microsoft.public.vc.ide_general
 
D

Default User

Luca said:
The problem is that this way VC++ considers the local parameters as
being global variables instead of local; this results in the class tab
of the workspace window being full of such wrong global variables.
Do you know how can I tell the IDE to analyze correctly code of C
old-style function definition?


Are you trying to compile it as C or C++? Old style C function
definitions are illegal in C++ and will need to be changed. Look into
auto prototyping tools. If it is C code, then VC++ should handle it
fine.




Brian Rodenborn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,160
Messages
2,570,889
Members
47,422
Latest member
LatashiaZc

Latest Threads

Top