question about VC++ 6



 DEVELOP > c-Plus-Plus > question about VC++ 6

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: "Luca"
Date: 06 Feb 2004 03:09:49 AM
Object: question about VC++ 6
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
.

User: "lallous"

Title: Re: question about VC++ 6 06 Feb 2004 04:22:55 AM
"Luca" <lcdll@libero.it> wrote in message
news:a97dd389.0402060109.34c67019@posting.google.com...

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
--
Elias
.

User: "james"

Title: Re: question about VC++ 6 04 Feb 2004 09:38:25 PM
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));
......
"Luca" <lcdll@libero.it> ???
news:a97dd389.0402060109.34c67019@posting.google.com ???...

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

.

User: "Default User"

Title: Re: question about VC++ 6 06 Feb 2004 11:22:02 AM
Luca wrote:

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
.


  Page 1 of 1

1

 


Related Articles
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER