472,334 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

What following statement means?

//a header file

#define API_ABC

//a CPP file

class API_ABC Myclass;
class Myclass{
......
};

What does "#define API_ABC" do when declaring a class(Myclass in this
case)? Why use it?

Thanks.

WM

Jul 23 '05 #1
2 1393
we*****@yahoo.com wrote:
//a header file

#define API_ABC

//a CPP file

class API_ABC Myclass;
class Myclass{
.....
};

What does "#define API_ABC" do when declaring a class(Myclass in this
case)? Why use it?


Why don't you ask the one who wrote it?

In some systems you're allowed to give additional qualifiers to any
symbol or class, like __declspec(dllexport) or some such nonsense.
Perhaps in some other incarnation of this code 'API_ABC' is actually
defined to expand into some kind of linkage specification...

V
Jul 23 '05 #2
In message <11**********************@z14g2000cwz.googlegroups .com>,
we*****@yahoo.com writes
//a header file

#define API_ABC

//a CPP file

class API_ABC Myclass;
class Myclass{
.....
};

What does "#define API_ABC" do when declaring a class(Myclass in this
case)?
Nothing, in this case.
Why use it?


(a) Maybe as a hint to the maintainer that the class is an abstract base
class needed for this application programming interface .

(b) In some programming environments the macro might be differently
defined, so it expands to some (non-standard) compiler- and
platform-dependent string which tells the compiler to do something
special with the class.

--
Richard Herring
Jul 23 '05 #3

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

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's...
54
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and...
29
by: asj | last post by:
Can you guess what this is? http://www.blueboard.com/phone/apache_sept_2003.gif It's a history of the IIs "Titanic", which is being slowly and...
12
by: Steven T. Hatton | last post by:
This is something I've been looking at because it is central to a currently broken part of the KDevelop new application wizard. I'm not...
1
by: David | last post by:
I'm running into problems using XSD.exe to generate classes from XSD files using the <Include> functionality. Being a complete newbie with this, I...
12
by: prashna | last post by:
Hi all, I am new to C and I am working on some simple programs.I am getting the following warning which I am not able to find what it is, please...
4
by: Tina | last post by:
This is an issue regarding what exactly is accomplished by using "Protected" when defining a variable. It seems it does much more than just...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at:...
11
by: antonyliu2002 | last post by:
I know that this has been asked and answered thousands of times. As a matter of fact, I know that I need to say If Not Page.IsPostBack Then 'Do...
38
by: Zytan | last post by:
What is the difference between these two lines? Dim args As Object() = New Object() {strText} Dim args As Object() = {strText} args seems...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

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.