Data Conversion from atoi and atof : <p>I am making a record in which I used atoi and atof conversions to convert string into int and float. But the compiler is giving me this error: "[Error] cannot convert 'int*' to 'char*' for argument '1' to 'char* gets(char*)".
The code is:</p>

<pre><code>int main()
{
    int ch_id[25];
    float ch_gp[25];
    struct Data

    {
        char name[25];
        char Fname[25];
        int idno;
        float Gpa;

    };
    Data emp;

    cout&lt;&lt;"Enter name:";
    gets(emp.name);
    cout&lt;&lt;"Enter fathers's name:";
    gets(emp.Fname);
    cout&lt;&lt;"Enter Id number:";
    gets(ch_id);
    emp.idno=atoi(ch_id);
    cout&lt;&lt;"Enter GPA:";
    gets(ch_gp);
    emp.Gpa=atof(ch_gp);

}
</code></pre>

<p>I tried resolving it but I couldn't figure out the mistake.Help!</p>
