C++Primer第五版:练习2.39 2.40

练习2.39
return type of ‘main’ should be ‘int’ instead of ‘Foo’
expected a ‘:’
‘Foo’ followed by ‘int’ is illegal(did you forget a ‘:’?)

练习2.40

#include<iostream>

struct Sales_data
{
    
    
    std::string bookNo;
    unsigned units_sold = 0;
    double price = 0.0;
    double revenue = 0.0
};

猜你喜欢

转载自blog.csdn.net/Xgggcalled/article/details/108960852
今日推荐