头文件中 ::std::ifstream file;
void writeBytesFromFloat(::std::ofstream& file, float);
报错位置
//位置1
if(stats.type == BINARY)
{
file.seekg(0, ::std::ios::beg);//基地址为文件开始处,偏移地址为0,于是指针定位在文件开始处
// Test if the STL file has the right size
if((fileSize - HEADER_SIZE) % SIZE_OF_FACET != 0)
{
::std::cerr << "The file " << file << " has a wrong size."
<< ::std::endl;
throw wrong_header_size();
}
//位置2
else
{
::std::cerr << "The file " << file << " could not be found." << ::std::endl;
throw error_opening_file();
}
错误
error: no match for 'operator<<' (operand types are 'std::basic_ostream' and 'std::ifstream {aka std::basic_ifstream}')
::std::cerr << "The file " << file << " has a wrong size."
error: cannot bind 'std::basic_ostream' lvalue to 'std::basic_ostream&&'
::std::cerr << "The file " << file << " has a wrong size."
求佬大帮忙解决,真的感谢
^
^