|
From: | Markus Fritsche |
Subject: | Re: [Help-smalltalk] How can I build a char**? |
Date: | Tue, 23 Jul 2002 01:05:08 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a) Gecko/20020610 |
Bonzini wrote:
Could anyone give me a hint how I can build a char** like mesg[0] = " "; mesg[1] = "<C>Hello World!"; mesg[2] = " "; ?Build a CArray of CStrings and fill in the CStrings one by one. IIRC the GDBM module can be of some help when dealing with C data structures. The trick was understanding the various kinds of dereferencing primitives.
| cs ca | ca := CArray new: 1. ca type: (CArrayCType elementType: (CType cObjectType: CString) numberOfElements: 1). cs := CString new: 10. cs value: 'asd'. ca at: 0 put: cs. (ca derefAt: 0) printNl!
This prints out 'asd', but I'm not sure if this is what I mean. Is it? Kind regards, Markus
[Prev in Thread] | Current Thread | [Next in Thread] |