Mail Archives: djgpp/1998/02/04/21:32:24
Try using a hex command \x?? to insert the value. Then GCC can't complain
because \x?? means a special symbol.
And the second error occurs because the command >> is the binary shift command
or the istream receive operator. That one always makes me wonder - isn't cout <<
"Hello world!"; usually a binary shift of "cout" left a few thousand places
(because the pointer will probably in the range of 2048+ at least...), but then
C++ would considder it a re-write of the default commands. Odd but unusual way
of using the language to your advantage.
--
"DeHackEd"
EMail address not given out due to low-life spammers.
Bitland AT aol DOT com wrote in message ...
>
>Found two C++-parserproblems, which *imho* shouldn't be there:
>
>// ----- First one:
>
>class A
>{ public:
> char *string;
>
> A(char *s) : string(s) {}
>};
>
>class B : public A
>{ public:
> B(void) : A("doesn't work here with language-specific letters !") {}
>};
> // i.e. german letters in the string will produce 'parser error'
>'unterminated string'
>
>B test;
>
>main()
>{ A *test = new A("but here it works !");
> delete test;
>}
>
>// -----
>
>Templates of templates:
>
>i.e.: MyList<MyArray<MyString>> (oh yes, I do such things !)
>
>Parser has problems with the final >>
>No more problem, if you type a blank between there.
>
>If somebody knows a solution for the first problem, please mail me.
>Andy Kluge -- *\o/* --- Wiesbaden, Germany ---------- bitland AT aol DOT com
>
> - - - - - - OOP is when flags are set at half-mast - - -
>- - -
- Raw text -