473,320 Members | 1,846 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,320 software developers and data experts.

Global pound define?

Is there a place you can globally #define so that
what's #define'd is in all classes' scope?

Such as #include - other .c files for C?

Thanks,

Andrew
Nov 17 '05 #1
2 3025
Not really, AFAIK, each class has to declare what namespaces to import.
This uses the using keyword in C# or imports in VB.NET....

there's a good explanation of why this would really be a problem for an OO
language:

http://groups.google.com/groups?hl=e...=UTF-8&oe=utf-
8&threadm=dda1fb3a.0207221304.4d36d34b%40posting.g oogle.com&rnum=1&prev=/groups%3Fq%3DC%2523%2B%2523include%26num%3D50%26hl %3Den%26lr%3D%26ie%3DUTF-
8%26oe%3Dutf-8%26sa%3DN%26tab%3Dwg

depending on your point of view...

On Mon, 14 Jul 2003 09:06:40 -0700, Andrew <a@b.com> wrote:
Is there a place you can globally #define so that what's #define'd is in
all classes' scope?

Such as #include - other .c files for C?

Thanks,

Andrew


--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 17 '05 #2
Not really, AFAIK, each class has to declare what namespaces to import.
This uses the using keyword in C# or imports in VB.NET....

there's a good explanation of why this would really be a problem for an OO
language:

http://groups.google.com/groups?hl=e...=UTF-8&oe=utf-
8&threadm=dda1fb3a.0207221304.4d36d34b%40posting.g oogle.com&rnum=1&prev=/groups%3Fq%3DC%2523%2B%2523include%26num%3D50%26hl %3Den%26lr%3D%26ie%3DUTF-
8%26oe%3Dutf-8%26sa%3DN%26tab%3Dwg

depending on your point of view...

On Mon, 14 Jul 2003 09:06:40 -0700, Andrew <a@b.com> wrote:
Is there a place you can globally #define so that what's #define'd is in
all classes' scope?

Such as #include - other .c files for C?

Thanks,

Andrew


--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 17 '05 #3

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

Similar topics

4
by: Robert Zierhofer | last post by:
hi there, it seems as if i can´t convert the euro and pound sign to their html equivalents. i tried eregi_replace("€", "&euro;", $haystack); eregi_replace("£", "&pound;", $haystack); as...
4
by: Dan Elliott | last post by:
Hello, Converting from a working C program to C++, I run into the following error: I have a header: (header.h) namespace shared{ ... struct X{ ...
10
by: Kleenex | last post by:
Reason: I am working on an embedded project which has very limited memory (under 512 bytes, 60 or so of which is stack space), which translates into limited stack space. In order to save on stack...
7
by: Michael | last post by:
Hi newsgroup, as the subject indicates I am looking for an advice using global variables. I am not if this problem is more about style then C. If its wrong in thi group, sorry. So I have a...
0
by: Andrew | last post by:
Is there a place you can globally #define so that what's #define'd is in all classes' scope? Such as #include - other .c files for C? Thanks, Andrew
9
by: CDMAPoster | last post by:
About a year ago there was a thread about the use of global variables in A97: http://groups.google.com/group/comp.databases.ms-access/browse_frm/thread/fedc837a5aeb6157 Best Practices by Kang...
11
by: Sylvia A. | last post by:
How can I define global classes in web application ? Classes can be set to session variables ? Thanks
8
by: davoti | last post by:
Hi, I never truly understand how a macro with ## work in C, for example, if I define #define X X##_YZ what and how does this translated into after compilation? Can't find similar info....
1
weaknessforcats
by: weaknessforcats | last post by:
C++: The Case Against Global Variables Summary This article explores the negative ramifications of using global variables. The use of global variables is such a problem that C++ architects have...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.