c++, get phone number from txt file
<p>I'm trying input a phone number in the format: 555-555-5555 into a struct with three int's.  I've tried using getline with a delimiter of "-", but I keep getting the error: "cannot convert parameter 1 from 'int' to 'char *'".</p>

<p>I tried creating a temp char* variable to store the number in and then type casting it to int, but that didn't work.  </p>

<p>How should I go about doing this?</p>

<p>Thanks</p>

<p>edit:</p>

<p>here's some of the code:</p>

<pre><code>void User::Input(istream&amp; infile) {

    char* phone_temp;

    ...

    infile.getline(phone_temp, sizeof(phoneNum.areaCode), "-");
    phoneNum.areaCode = (int)phone_temp;

    ...
}
</code></pre>
