Dividing a string into elements in a stucture
<p>I have a text file which contains lines that look like this:</p>

<pre><code>string, int  string
</code></pre>

<p>and i am trying to divide each line into 3 elements that are sent to a structure.
Here what my code looks so far:</p>

<pre><code>#include "stdafx.h"
#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;fstream&gt;

using namespace std;

struct address
{
 string street;
 int zip;
 string city;
};
istream &amp; operator &gt;&gt;(istream &amp; in, address &amp; add)
{
 getline(in, add.street);
 getline(in, add.zip);
 getline(in, add.city);
}
</code></pre>

<p>Any advice or help would be appreciated, thanks in advance :D</p>