65,210
社区成员
发帖
与我相关
我的任务
分享
#pragma once
#include <fstream>
#include <string>
#include "wordstream.h"
#include "wordtable.h"
class Concordance {
WordStream wordStream; ///< The wordStream from which the concordance is built
WordTable table; ///< The table of words and their occurrence lists
public:
Concordance(std::ifstream& in);
void print(int wordIndent, int lineLength);
void printIndex();
};
#include "concordance.h"
//using namespace std;
Concordance::Concordance(std::ifstream& in)
{
in.close();
}
void Concordance::print(int wordIndent, int lineLength)
{
}
void Concordance::printIndex()
{
}
#include <iostream>
using namespace std;
class A
{
public:
protected:
private:
int a;
int b;
};
class B
{
public:
B(){}
B(int a,int b)
{
this->a=a;
this->b=b;
}
protected:
private:
int a;
int b;
};
class C
{
public:
C(int a=0,int b=0)//这样写相当于既写了系统提供的默认构造函数,又写了自己的构造函数
{
this->a=a;
this->b=b;
}
protected:
private:
int a;
int b;
};
void main()
{
A a1;
B b1;
B b2(2,3);
C c1;
C c2(2,3);//请主意3者的区别
}