how to create object with return type of both 1) true/false and 2) dynamic data
<p>just as the return type of the method mysql_fetch_array() is both a boolean a numerative array and an associate array where you can assess if the sql query was successful and if so store the return data into an array and then access that same object $row and display the rows like shown:</p>

<pre><code>while($row = mysql_fetch_array($result)){
    echo $row['name']. " - ". $row['age'];
    echo "&lt;br /&gt;";
}
</code></pre>

<p>so you can both test the $row variable for true or false and then access the $row variable in this case being an array and be able to do things with it.</p>

<p>I'd like to do the same in c++</p>

<p>im trying to create a method that will return the enum value based on a few conditions within the method and if the method is true then do something else. The problem is i dont know how to create this data type. How can i achieve this?</p>
