wp-codebox test

Categories: Uncategorized
Tags: No Tags
Comments: No Comments
Published on: 2008/12/03


/*********************
这里是注释
*********************/
#include 
#include 
#include 
#include 
#include "LearnFetcher.h"
 
using namespace std;
 
struct Course
{
    int ID;
    string name;
};
 
struct CourseFile
{
    int cind;
    string name;
    string url;
};
 
struct CourseList
{
    vector courses;
    void AddCourse(Course* c) {courses.push_back(c);}
    CourseList() {}
    ~CourseList() {
	    for (vector::iterator ptr = courses.begin(); ptr != courses.end(); ptr++)
        {
		    delete (*ptr);
	    }
	    courses.clear();
    }
	Course* operator [](int ind) {return courses[ind];}
	size_t size() {return courses.size();}
};
 
struct FileList
{
    vector files;
    void AddFile(CourseFile* f) {files.push_back(f);}
    FileList() {}
    ~FileList() {
	    for (vector::iterator ptr = files.begin(); ptr != files.end(); ptr++)
        {
		    delete (*ptr);
	    }
	    files.clear();
    }
	CourseFile* operator [](int ind) {return files[ind];}
	size_t size() {return files.size();}
};
No Comments - Leave a comment

Leave a comment

Your email address will not be published. Required fields are marked *


Welcome , today is Wednesday, 2018/02/21