how come #include "*.cpp" works?

mwoehlke mwoehlke@tibco.com
Thu May 18 14:46:00 GMT 2006


Dave Korn wrote:
> On 17 May 2006 16:43, mwoehlke wrote:
>> On that note, does anyone know of a good C++ forum? I have an
>> interesting problem I'd like to see if anyone has any clever solutions for.
> 
>   You've piqued my curiousity now.  Go on then, what's the C++ problem?  (And
> for 5 bonus points for topicality, how can it be related to hippos?)

Hehe, ok... but I think I figured out a good way to solve the problem 
already :-).

I'm writing a program to dump structures from core dumps generated from 
symbol-less binaries (i.e. no easy looking at structures, etc, in gdb). 
It works great; you give it a structure name and an address and it 
reads, decodes, and prints the structure, as well as referenced objects 
like strings (the idea being to dump whole hierarchies of structures at 
once).

Anyway... what I do is have an "OBJ" ABC and subclass it for each type 
of structure I want this program to be able to understand. What I want 
to do is have some system that entails the fewest *lines* of code 
(macros to turn one line into lots of *actual* code are OK) that can a: 
construct an object by name, and b: provide me a list of names of 
classes which can be created (i.e. if you enter an invalid one, it will 
tell you valid ones). Any thoughts? (Maybe dropping a hippo on the code 
will make it as small as I want it to be? ;-))

-- 
Matthew
Hey, buddy, if it's OT, TITTTL!



More information about the Cygwin-talk mailing list