我怎么才可以让 main 部分 std::cout x+y的结果? 笨啊。
#include
#include
#include "calculat.h"
void main(void)
{
std::cout << "In the English system of weights, we have pounds and ounces, with 1 pound equal to 16 ounces.\n";
EnglishWeight(2,5);
std::cout << "For example:100lb+50lb\n"<
}
--------------------------- calculat.h ---------------------
class EnglishWeight
{
public:
typedef int Weight;
Weight temp;
EnglishWeight(Weight x, Weight y);
};
----------------------calculat.cpp-----------------------
#include
#include
#include "calculat.h"
EnglishWeight::EnglishWeight(int x, int y)
{
temp = x+y;
std::cout <<"here....."<
}