[Insight-users] errors about output with files
Bill Lorensen
bill.lorensen at gmail.com
Thu Oct 1 19:32:43 EDT 2009
Try these includes:
#include <iostream>
#include <fstream>
2009/10/1 李健 <rongx2 at live.cn>:
> Dear all:
>
> In itk examples, sometimes the program use std::ofstream to output the
> results to a file. For example:
>
> if( argc > 9 )
> {
> std::ofstream parametersFile;
> parametersFile.open( argv[9] );
> parametersFile << finalParameters << std::endl;
> parametersFile.close();
> }
>
> When I use the same code, however, there is an error information:
>
> error: aggregate 'std::ofstream parametersFile' has incomplete type and
> cannot be defined.
>
> How should I solve this problem?
>
> Thanks a lot.
>
> ________________________________
> 更多热辣资讯尽在新版MSN首页! 立刻访问!
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
More information about the Insight-users
mailing list