回複:懂C++的大俠幫看看, 謝謝

來源: 2006-02-20 12:01:22 [舊帖] [給我悄悄話] 本文已被閱讀:

#include
#include
#include "calculat.h"

void main(void)
{
std::cout EnglishWeight anyName(100,50);
std::cout }

--------------------------- calculat.h ---------------------
class EnglishWeight
{
typedef int Weight;
Weight temp;

// Constructor
EnglishWeight(int x, int y)
{
temp = x+y;
}

public void PrintResult() {
std::cout }
};