My simple 'if' statement isn't doing what's in the code
<p>In this little code section, I am gathering input data from the user. If the first input given is a "0" then it does not accept more information, if it is not a "0" then it prompts for the rest of the data.</p>

<pre><code>class Molecule {

char structure[10];
char name[20];
double weight;

public:

Molecule();
bool read();
void display() const;

};

bool Molecule::read() {


cout &lt;&lt; "Enter structure : ";
cin &gt;&gt; structure;

if (structure != "0") {
cout &lt;&lt; "Enter name : ";
cin &gt;&gt; name;
cout &lt;&lt; "Enter weight : ";
cin &gt;&gt; weight;
}
}
</code></pre>

<p>This should say, if structure is not 0, then prompt for the rest of the information. But when I run this it displays the other cout and cin even if I input 0. Why is it not doing what it is supposed to do?</p>
