Broken header files on 'Je me lance!' CD

F

Francis Glassborow

'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 :-(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top