我怎么才可以让 main 部分 std::cout x+y的结果? 笨啊。
#include
#include
#include "calculat.h"
void main(void)
{
std::cout
EnglishWeight(2,5);
std::cout
}
--------------------------- 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
}
懂C++的大侠帮看看, 谢谢
所有跟帖:
•
回复:懂C++的大侠帮看看, 谢谢
-lidongmei-
♂
(87 bytes)
()
02/19/2006 postreply
15:46:01
•
是啊, 我这部分理论上好像清楚, 但使用上就糊涂了
-水年华-
♀
(0 bytes)
()
02/19/2006 postreply
15:54:01
•
方法如下。。
-北半球的孤单-
♂
(110 bytes)
()
02/19/2006 postreply
16:03:39
•
题目出的有问题?原题是打印磅还是转换公制?
-flywhc-
♂
(209 bytes)
()
02/19/2006 postreply
17:31:56
•
回复:懂C++的大侠帮看看, 谢谢
-greenpine_1234-
♀
(610 bytes)
()
02/20/2006 postreply
12:01:22
•
std::cout << temp< } should be std::cout <<temp<<endl; }
-greenpine_1234-
♀
(0 bytes)
()
02/20/2006 postreply
12:03:14