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

include command

Ron
Following the C++ standard document (ISO/IEC 14882) a preprocessing
directive:

#include pp-tokens new-line

is permitted. So i can write

#include "myfile.h"

but i can use even an identifier writing:

#define MYFILE "myfile.h"
#include MYFILE

ok? Anyway i cannot see any example with multiple tokens (since the standard
offers this possibility). Please, can you show me one?

I'm wondering if is correct what follows :

#define MYFILEA "my
#define MYFILEB file.h"

#include MYFILEA\
MYFILEB

I think it's wrong, but i cannot see another way.

Regards.

Jul 19 '05 #1
1 2660
"Ron" <no@spam.com> wrote...
Following the C++ standard document (ISO/IEC 14882) a preprocessing
directive:

#include pp-tokens new-line

is permitted. So i can write

#include "myfile.h"

but i can use even an identifier writing:

#define MYFILE "myfile.h"
#include MYFILE

ok? Anyway i cannot see any example with multiple tokens (since the standard offers this possibility). Please, can you show me one?

I'm wondering if is correct what follows :

#define MYFILEA "my
#define MYFILEB file.h"

#include MYFILEA\
MYFILEB

I think it's wrong, but i cannot see another way.


#define LT <
#define GT >

#include LT HEADER_NAME_FROM_COMMAND_LINE GT

This will make it possible to pass the macro HEADER... through the
command line for compiling a certain module without changing the
code. Most of the details are implementation-defined.

(at least that's my take on it)

Victor
Jul 19 '05 #2

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

Similar topics

7
by: mescaline | last post by:
Hi, Suppose a_file.cpp contains a function a_function() Now to include it in main_file.cpp I just do #include "a_file.cpp" and I'm all set. i recently came across this seemingly roundabout...
8
by: Ian Malone | last post by:
Sorry if this is a FAQ, but I had a quick look through the FAQ Lite and couldn't see it. Googling gives inconsistent answers. I'm coming from a C background. In C if I want to use command...
44
by: Neil Cerutti | last post by:
In Rob Pike's style guide he urges the following: Simple rule: include files should never include include files. If instead they state (in comments or implicitly) what files they need...
6
by: Till Crueger | last post by:
Hi, I know you shouldn't do this, but I just thought of a really nasty way to obfuscate c code. I am however not sure if this is correct c at all. What I did was this: file obfuscate.c:...
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...
2
by: Bill Roper | last post by:
Did you know that the #include directive when using angle brackets works substantially differently in VC7 than it did in VC6? It used to be that the reference for the additional include...
5
by: Viken Karaguesian | last post by:
Hello all, I've used the SSI Include command successfully in the past to include frequently used files that are based within my own site. However, what if I was to use a file located in a...
1
by: PI | last post by:
Hi guys, I need some urgent help here please: I am using an include_once() command to include a file that sits a level above the file view.php. when the code is run, I have an error as follows: ...
2
by: dave6502 | last post by:
Struggling newbe here, some of my #includes work, some dont. Is it possible to list the include path ? (in BASH), I have looked at the environmental variables (loads of them) but cannot find a...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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.