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

#include equivalet..?

Hi,

Is there any equalent of c langs' #include. I have several #defines (compile
time consts) that I want to include in several classes modules

Thanks in advance ;0)

Regards,
....Ashok
------------------------------------------------------------------------
"It is beautiful for an engineer to shape and design the same way
that an artist shapes and designs. But whether the whole process
makes any sense, whether men become happier - that I can no
longer decide." - Rudolph Diesel
Nov 29 '05 #1
3 1020
"G.Ashok" <gw******@hotmail.com> schrieb:
Is there any equalent of c langs' #include. I have several #defines
(compile
time consts) that I want to include in several classes modules


No, there is no equivalent. Simply define the constant in one file and use
them throughout the project.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 29 '05 #2

Herfried K. Wagner,

We can't a use a constant (#Const) defined in one file everywhere (in all
other project class/module files). It should be redeclared in all the files.
This is whats the problem with this.

Regards,
....Ashok
------------------------------------------------------------------------
Everyone develops incrementally; the difference is in the size of the
increments

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OL**************@TK2MSFTNGP10.phx.gbl...
| "G.Ashok" <gw******@hotmail.com> schrieb:
| > Is there any equalent of c langs' #include. I have several #defines
| > (compile
| > time consts) that I want to include in several classes modules
|
| No, there is no equivalent. Simply define the constant in one file and
use
| them throughout the project.
|
| --
| M S Herfried K. Wagner
| M V P <URL:http://dotnet.mvps.org/>
| V B <URL:http://classicvb.org/petition/>
|
Nov 30 '05 #3
Ashok,
If you need a compile constant (#Const) across your Project, then define it
in the project properties itself!

In VS 2005 use "Project - Properties - Compile - Advance Compile Options -
Custom constants"

In VS 2002 & 2003 use "Project - Properties - Configuration Properties -
Build - Custom constants"

--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"G.Ashok" <gw******@hotmail.com> wrote in message
news:Oj**************@TK2MSFTNGP12.phx.gbl...
|
| Herfried K. Wagner,
|
| We can't a use a constant (#Const) defined in one file everywhere (in all
| other project class/module files). It should be redeclared in all the
files.
| This is whats the problem with this.
|
| Regards,
| ...Ashok
| ------------------------------------------------------------------------
| Everyone develops incrementally; the difference is in the size of the
| increments
|
| "Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
| news:OL**************@TK2MSFTNGP10.phx.gbl...
|| "G.Ashok" <gw******@hotmail.com> schrieb:
|| > Is there any equalent of c langs' #include. I have several #defines
|| > (compile
|| > time consts) that I want to include in several classes modules
||
|| No, there is no equivalent. Simply define the constant in one file and
| use
|| them throughout the project.
||
|| --
|| M S Herfried K. Wagner
|| M V P <URL:http://dotnet.mvps.org/>
|| V B <URL:http://classicvb.org/petition/>
||
|
|
Dec 1 '05 #4

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

Similar topics

43
by: steve | last post by:
I am quite frustrated with php’s include, as I have spent a ton of time on it already... anyone can tell me why it was designed like this (or something I don’t get)? The path in include is...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
60
by: Derrick Coetzee | last post by:
It seems like, in every C source file I've ever seen, there has been a very definite include order, as follows: - include system headers - include application headers - include the header...
9
by: zolli | last post by:
Hi, I've been banging my head against this for a while now. Hoping someone here can shed some light on what's going on. On including stdlib.h in a file, I'm seeing the following errors: ...
5
by: David Mathog | last post by:
One thing that can make porting C code from one platform to another miserable is #include. In particular, the need to either place the path to an included file within the #include statement or to...
1
by: Minh | last post by:
I've just installed VS.NET 2003 on my Athlon XP 1800+. However I couldn't get any project with STL includes to compile even if I create a new empty project (and added #include <string>). It gave me...
1
by: ya man | last post by:
when i use #include <iostream.h> in some files i get lots of error messages of the kind 'ambiguous symbol this is solved when i use #include <iostream why is that ? and can i use #include...
3
by: Arpi Jakab | last post by:
I have a main project that depends on projects A and B. The main project's additional include directories list is: ...\ProjectA\Dist\Include ...\ProjectB\Dist\Include Each of the include...
6
by: tshad | last post by:
In my User control, I tried to do this: *************************************************************************** <Script runat="server"> Public ClientName As String = "<!-- #include file =...
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.