// t002.cpp
#include <vcl.h>
#include <iostream>
#include <vector>
#include <tchar.h>
#include <cstdlib>
#include <ctime>
using namespace std ;
#include "t002_class.h"
void main()
{
bbc today ;
today.output() ;
system("
AUSE");
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//---------------------------------------------------------------------------
// t002_class.h
#ifndef t002_classH
#define t002_classH
//---------------------------------------------------------------------------
#endif
class bbc {
private:
int news;
vector<int> title ;
public:
bbc(void) : title(news) ;
~bbc(void);
void output(void) ;
};
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// t002_class.cpp
//---------------------------------------------------------------------------
#include <vcl.h>
#include <iostream>
#include <vector>
#include <tchar.h>
#include <cstdlib>
#include <ctime>
using namespace std ;
#include "t002_class.h"
//---------------------------------------------------------------------------
bbc::bbc(void) : title(news) {
news = 8 ;
for( int i=0 ; i < news ; ++i ) {
title
= i ;
}
}
//---------------------------------------------------------------------------
bbc::~bbc(void)
{
}
//---------------------------------------------------------------------------
void bbc:utput(void)
{
news++;
cout << news << "\n";
for( int i=0 ; i < news ; ++i ) {
cout << "title[" << i << "] :" << title << "\n" ;
}
}
//---------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -