Reading characters
<p>I'm writing a program where the use puts in data, which is then stored as variables in a class. Yet when I try to display the data the character variable returns nothing like the data input. It looks like its writing the pointer address, but I don't know how to force it to print in characters. </p>

<p>It's quite a long program but the part that isn't working seems quite isolated.</p>

<pre><code>Clinked::Clinked(char site[100], double x, double y, double new_dip, double new_strike)
{
    //memcpy(site_name,site,100);
    strncpy(site_name,site,100); 
    cood_y=y;
    cood_x=x;
    dip=new_dip;
    strike=new_strike;
    next=NULL;
}

void Clinked::display()
{
    cout&lt;&lt;"Name of site:\t"&lt;&lt;site_name&lt;&lt;endl; 
    cout&lt;&lt;"Site coordinates:\t"&lt;&lt;cood_x&lt;&lt;" Easting\t"&lt;&lt;cood_y&lt;&lt;" Northing"&lt;&lt;endl;
    cout&lt;&lt;"Dip:\t"&lt;&lt;dip&lt;&lt;"\'\t"&lt;&lt;"Strike:\t"&lt;&lt;strike&lt;&lt;"\' N"&lt;&lt;endl&lt;&lt;endl;
}
</code></pre>

<p>the actual decleration in my class Clinked:</p>

<pre><code>Clinked(char site[100], double x, double y, double new_dip, double new_strike);
</code></pre>

<p>and the problem function</p>

<pre><code>void fNew_locality(Clinked *pos)
{
    char site[100];
    double x, y, dip, strike;
    bool good_dip, good_strike;

    cout&lt;&lt;"Enter the site name : ";
    cin.getline(site,100);

    ...use puts in some more data

    cout&lt;&lt;site; //this works fine

    new_locality = new Clinked(&amp;site[100],x,y,dip,strike);
    cout&lt;&lt;new_locality-&gt;site_name; //this doesn't
</code></pre>
