我怎麽才可以讓 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