Passing CPtrList through a procedure
- From: "ghozan" <ghozan@xxxxxxxxx>
- Date: 4 Jan 2007 05:41:21 -0800
Hi,
I am new to visual C++. I am trying to use CPtrList in a variable. I
declare the variable in the header file as a global variable. The
header file looks like this:
class CTMmine
{
public:
CTMmine();
virtual ~CTMmine();
void Execute(double minSupportRatio);
int grow(multiset<Item,Ascending> *items, int supp, int *itemset, int
level, int *comb, int cl);
int grow2(multiset<Item2,Ascending2> *items, int supp, int *itemset,
int level, int *comb, int cl);
void setData(char *file, int type){data = new Data(file,type);}
void setOutput(char *of){out = fopen(of, "wt");}
void ConstructTranctionTree(double minSupportRatio);
void CompressTransactionList();
void ClosedNodeCount();
void UpdateClosedNodeCount(set<CTTreeNode>::iterator it);
void FormList(set<CTTreeNode>::iterator it, int startTID);
void printList();
// void print(int *itemset, int level, int support);
void print(int *itemset, int il, int *comb, int cl, int support, int
spos=0, int depth=0, int *current=0);
vector<CSegment> *m_pL1transList;
int m_nL1;
int *m_nL1Support;
private:
Data *data;
int *m_remap;
//int *myCount;
CTTree *m_pTransactionTree;
CPtrList *myList;
int m_minsup;
int m_nTrans;
FILE *out;
};
In the header file I declare a variable called myList as a CPtrList. In
the cpp file I have added the header for CPtrList:
#include "stdafx.h"
#include <iostream>
#include <stdio.h>
#include <time.h>
#include <afx.h>
#include <set>
#include <vector>
using namespace std;
#include <algorithm>
#include "data.h"
#include "TTree.h"
#include "TMmine.h"
I have built the cpp file and no error found. But when I try to
compiled it the following errors occured:
D:\My Data\Program Thesis\TMmine.h(102) : error C2143: syntax error :
missing ';' before '*'
D:\My Data\Program Thesis\TMmine.h(102) : error C2501: 'CPtrList' :
missing storage-class or type specifiers
D:\My Data\Program Thesis\TMmine.h(102) : error C2501: 'myList' :
missing storage-class or type specifiers
Error executing cl.exe.
Creating browse info file...
TMAlg.exe - 3 error(s), 27 warning(s)
Is there something wrong? Can anyone give me the answer? Thank you very
much.
.
- Follow-Ups:
- Re: Passing CPtrList through a procedure
- From: Scott McPhillips [MVP]
- Re: Passing CPtrList through a procedure
- Prev by Date: Re: problem Associate File Extensions with a Custom application
- Next by Date: Re: CSpinButtonCtrl
- Previous by thread: CDateTimeCtrl ideal size
- Next by thread: Re: Passing CPtrList through a procedure
- Index(es):
Relevant Pages
|