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

Broken header files on 'Je me lance!' CD

'You Can Do It!' has just been published in French as 'Je me lance!',
not this is not an advertising pitch but an appeal for your help.

Quite sensibly the translators have augmented my library by adding
functions named in French that delegate to the English equivalent. That
makes life easier for the target reader and is consistent with the
pedagogical philosophy of the original book.

However the person responsible for adding code to the header files has
made a beginner's error; he has failed to qualify the delegating
definitions as inline. All is well as long as the reader is only using
single source code files but as soon as the reader gets to Chapter 3
s/he is exposed to multiple source code files which include one of the
badly modified header files. The result is redefinition errors at link
time and a complete collapse of confidence for the reader who may spend
many hours trying to discover what they have done wrong. And the typical
reader has no hope of finding the fix for themselves with the result
that the essential bond of trust between authors and readers has been
broken.

Fortunately an early reader alerted me to the fact that there was a
problem by emailing me about his struggle to get code to work.

Many readers of this newsgroup are the kind of people who are consulted
when problems arise and a good number of them have French as their first
language. If you are one of the latter and also subscribe to one or more
French language programming newsgroups I would be most grateful if you
could alert people on those groups to both the problem and the
availability of the corrected files at

http://www.spellen.org/youcandoit/french.htm

Now a little piece of C++ code that I use myself for detecting potential
problems with redefinition errors:

File 1

#include "x.h"
#include <iostream>

int foo();

int main(){
std::cout << foo();
}

In file 2

#include "x.h"

int foo(){ return 1;}

Replace x.h with the header you want to test and try to create an
executable. If all works then you do not have redefinition problems
(though there may be many others:-).

A pity the translators did not use such a simple test :-(
--
Francis Glassborow ACCU
Author of 'You Can Do It!' see http://www.spellen.org/youcandoit
For project ideas and contributions: http://www.spellen.org/youcandoit/projects
Jul 22 '05 #1
0 989

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

Similar topics

0
by: Ray Tayek | last post by:
hi, trying to convert some csv files into xsml and pulling a few hairs out :(. using the files below. a java program will parse the csv and take care of strange names and notes that line breaks in...
16
by: matthurne | last post by:
I just started learning C++ on my own...I'm using Accelerated C++. Something it hasn't explained and I keep wondering about is how header files actually work. I suspect it doesn't get into it...
11
by: Steven T. Hatton | last post by:
In the past there have been lengthy discussiions regarding the role of header files in C++. People have been very adamat about header files serving as in interface to the implementation. I do...
205
by: Jeremy Siek | last post by:
CALL FOR PAPERS/PARTICIPATION C++, Boost, and the Future of C++ Libraries Workshop at OOPSLA October 24-28, 2004 Vancouver, British Columbia, Canada http://tinyurl.com/4n5pf Submissions
3
by: pooja | last post by:
Suppose i have created a class c1 with f1()in c1.cpp and included this c1.cpp in file1.cpp file , which is also having main() by giving the statement #include "c1.cpp". the same i can do by...
18
by: John Smith | last post by:
Hi all What does the group think of the practise of including one header file from inside another? I have some legacy code where this has been done, and it creates a dependency on a module...
6
by: Jason Collins | last post by:
There seems to be an inconsistency (bug?) in the way the Set-Cookie header is handled by the WebHeaderCollection. That is, the values of Set-Cookie, when an Expires is specified, contain the ","...
0
by: Jarod_24 | last post by:
I have some problems with using Net.WebClient This function of mine recieves an array with Urls, and Filenames, and is supposed to download all the files (binary files) that is listed in the...
1
by: Duncan | last post by:
I have a strange problem with sessions in PHP 5. I have a simple script that prints a random number both as a string and a picture on the screen. When I run the script for the first time, it works...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.