473,326 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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
Jul 22 '05 #1
3 1472
"Luca" <lc***@libero.it> wrote in message
news:a9**************************@posting.google.c om...
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
Jul 22 '05 #2
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" <lc***@libero.it> ???
news:a9**************************@posting.google.c om ???...
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

Jul 22 '05 #3
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
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

65
by: perseus | last post by:
I think that everyone who told me that my question is irrelevant, in particular Mr. David White, is being absolutely ridiculous. Obviously, most of you up here behave like the owners of the C++...
0
by: Bosicat | last post by:
Here is one question about ocx develop with VC++7.0. I build a ocx with VC++7.0, but it need run under the enviroment which does NOT install the VC.NET & Microsoft Framework.NET. I know the ocx...
12
by: mysteron | last post by:
i have vc 2003 installed on my dev machine and was wondering if I can install 2005 beta 2 on the same machine and have both working perfectly and not interfering with each other? TIA
6
by: Malvolio | last post by:
I know this is a *really* stupid question but what the hell is visual c++? I downloaded it and it doesn't seem to work. It isn't like any c++ compiler I ever saw before and the manual on the...
8
by: Amit | last post by:
Hello group, I will appreciate it if you give me some advice on my question: I am asked to write a program. This program is supposed to act as "Adobe PDF" feature which some of you either have...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.