Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>For gareth and the Forum :</p> <p>the header:</p> <pre><code>typedef QVector&lt;Coordinates&gt; VesselCoordinates; bool (*getVessel)(Charakter forCharakter, Vessel&amp; getVessel,VesselCoordinates &amp;getCoordinates ); </code></pre> <p>later i bind tis function pointer to an static function ( cause this part of my Program will be one day convertet to c) </p> <p>cpp file lower layer:</p> <pre><code> static struct { Charakter currentPlayerVessel; VesselCoordinates possibility; }data; static bool getVessel(Charakter forCharakter, Vessel&amp; getVessel,VesselCoordinates &amp;getCoordinates ); // funktion to bind the funktion pointer to this static funktion so it can be called outside the File static bool serverNamespace::getVessel(Charakter forCharakter, Vessel&amp; getVessel,VesselCoordinates &amp;getCoordinates ) { bool retValue= false; if ( forCharakter == data.currentPlayerVessel){ // TODO abfragen ob die Adresse regestriert ist! if ((true == minSize()) and ((true == shipsInRow())or (true == shipsInLine()))) { retValue = true; Vessel test = (Vessel)data.possibility.size(); getVessel = test; getCoordinates = data.possibility; } } return retValue; } </code></pre> <p>And then i can use this in the upper layer cpp file to get the information i need:</p> <pre><code>// in an Funktion : VesselCoordinates currentCoordinates; currentCoordinates.clear(); Vessel currentVessel; if (true == basicFleet-&gt;getVessel(currentCharakter,currentVessel, currentCoordinates )) // doing stuff to it </code></pre> <p>so its worik fine but your idea worked just as fine. Maybe you can see why my idea is also working.</p> <p>Thank you </p> <p>elektor</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload