How fo write an FG string property from an indexed string in a structure?

Possibly someone can help please , I have tried to find an example with no
luck, I am sure i had it working yesterday but now every way i try i end up
with it wrong at compile, a seg fault or a property node with an empty
string. The basic setup works fine with doubles ect, here i only show the
string code.


Its wrong, but this is what i want to do, where : index i is declared as an
int,  path is a node, and path[i] is a string indexed in the structure
called buf-    node->setStringValue("path",buf->path[i]);
)

1-The stucture called buf with indexed stings in it from the h file
>
    enum {
        FG_MAX_AIRCRAFT = 25
    };
    uint32_t num_aircraft;
    string callsign[FG_MAX_AIRCRAFT];
    string path[FG_MAX_AIRCRAFT];
>


2- I write to the stucture with

>
      tempnode = node->getChild("path");
      if ( tempnode != NULL ) {
          net->path[i] =  tempnode->getStringValue();
      }

>


-- 
Regards Harry
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to