Topic: Help on String standard


Author: anu@boi.hp.com (Anurag Nigam)
Date: Tue, 27 Jul 1993 21:05:02 GMT
Raw View
Hello,


 I have run into a problem with the String class.  There is a
typedef conflict with Intrinsic.h and String.h.  I built a C++ program
using the String Class in String.h and now I am trying to do a GUI in Motif.
The problem arises is that when I link the two programs there is a conflict
with the String Class.  I was wondering if there is a solution to my problem
and I was wondering if there is a standard on the String class.  It seems
like that the String declared in Intrinsic.h should be changed because it is
only a convience from char* to String.

 Any help on how to solve the problem would be greatly appreciated.
I hope some discussion will help solve the problem of global interference
can be solved.  Thank you very much for your time.


 Anurag Nigam
 or just "Anu"


----------------------------------------------------------------------------
Hewlett-Packard    Raised: CHS in Boston
Disk Memory Division   College: CMU in Pittsburgh
Research and Development  Summer Job: HP in Boise
Drive Technology Engineering  Perm Job: Who knows, but the
            city  keeps getting
            smaller. :(






Author: kanze@us-es.sel.de (James Kanze)
Date: 28 Jul 93 18:46:42
Raw View
In article <CAuD8E.L67@boi.hp.com> anu@boi.hp.com (Anurag Nigam)
writes:

|>  I have run into a problem with the String class.  There is a
|> typedef conflict with Intrinsic.h and String.h.  I built a C++ program
|> using the String Class in String.h and now I am trying to do a GUI in Motif.
|> The problem arises is that when I link the two programs there is a conflict
|> with the String Class.  I was wondering if there is a solution to my problem
|> and I was wondering if there is a standard on the String class.  It seems
|> like that the String declared in Intrinsic.h should be changed because it is
|> only a convience from char* to String.

I think you just answered your own question.

You have the .h file, so edit it.  Since it is just a typedef (and not
a class), you can do this with impunity.  (Just make sure you also
edit any source files you have that use it.)

And let the vendor know that such invasion of the global namespace is
not an acceptable practice, and never was.  (Rather, let the vendors
know.  The vendor of String.h is equally to blame.)
--
James Kanze                             email: kanze@us-es.sel.de
GABI Software, Sarl., 8 rue du Faisan, F-67000 Strasbourg, France
Conseils en informatique industrielle --
                   -- Beratung in industrieller Datenverarbeitung