25.09.2017 Views

cpp_tutorial

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

C++<br />

};<br />

void setLength( double len );<br />

double getLength( void );<br />

// Member functions definitions<br />

double Line::getLength(void)<br />

{<br />

return length ;<br />

}<br />

void Line::setLength( double len )<br />

{<br />

length = len;<br />

}<br />

// Main function for the program<br />

int main( )<br />

{<br />

Line line;<br />

// set line length<br />

line.setLength(6.0);<br />

cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!