<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Dear all:<BR>
&nbsp;<BR>
In itk examples, sometimes the program use std::ofstream to output the results to a file. For example:<BR>
&nbsp;<BR>
&nbsp; if( argc &gt; 9 )<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp; std::ofstream parametersFile;<BR>&nbsp;&nbsp;&nbsp; parametersFile.open( argv[9] );<BR>&nbsp;&nbsp;&nbsp; parametersFile &lt;&lt; finalParameters &lt;&lt; std::endl;<BR>&nbsp;&nbsp;&nbsp; parametersFile.close();<BR>&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;<BR>
When I use the same code, however, there is an error information: <BR>
&nbsp;<BR>
error: aggregate 'std::ofstream parametersFile' has incomplete type and cannot be defined.<BR>
&nbsp;<BR>
How should I solve this problem?<BR>
&nbsp;<BR>
Thanks a lot.<BR>                                               <br /><hr />更多热辣资讯尽在新版MSN首页! <a href='http://cn.msn.com/' target='_new'>立刻访问!</a></body>
</html>