Make virtual method in my project
-
//*****************************Main Program ******************************
#include #include #include #include "ReadWrite.h" #include "Graph.h" void main(int doiso, char *thamso[]) { GRAPH G; int rf=G.ReadData(thamso[1]); if(!rf) printf("Khong doc duoc file!\n"); else { printf("Doc duoc file!\n"); G.GraphAlgorithm(); int wf=G.WriteData(thamso[2]); if(wf) printf("Ghi file thanh cong!"); } getch(); }
//******************************Graph.cpp*********************************#include #include #include "Graph.h" int GRAPH::ReadData(char *FileName) { FILE *fp=fopen(FileName,"rt"); if(!fp) return 0; fscanf(fp,"%d",&n); B=new unsigned char *[n]; unsigned char *temp=new unsigned char [n]; for(int d=0; d //***********************Graph.h************************************** `class GRAPH { private: int n; int label; int *LabelLT; unsigned char **B; public: int ReadData(char *FileName); const int WriteData(char *FileName); void GraphAlgorithm(); void Visit(int i); };` Help me, make virtual method in my project! <(-|-)> "To be or not to be"
-
//*****************************Main Program ******************************
#include #include #include #include "ReadWrite.h" #include "Graph.h" void main(int doiso, char *thamso[]) { GRAPH G; int rf=G.ReadData(thamso[1]); if(!rf) printf("Khong doc duoc file!\n"); else { printf("Doc duoc file!\n"); G.GraphAlgorithm(); int wf=G.WriteData(thamso[2]); if(wf) printf("Ghi file thanh cong!"); } getch(); }
//******************************Graph.cpp*********************************#include #include #include "Graph.h" int GRAPH::ReadData(char *FileName) { FILE *fp=fopen(FileName,"rt"); if(!fp) return 0; fscanf(fp,"%d",&n); B=new unsigned char *[n]; unsigned char *temp=new unsigned char [n]; for(int d=0; d //***********************Graph.h************************************** `class GRAPH { private: int n; int label; int *LabelLT; unsigned char **B; public: int ReadData(char *FileName); const int WriteData(char *FileName); void GraphAlgorithm(); void Visit(int i); };` Help me, make virtual method in my project! <(-|-)> "To be or not to be"
I can see only one class in this code. And really dont understand your question.
Prasad Notifier using ATL | Operator new[],delete[][^]
-
//*****************************Main Program ******************************
#include #include #include #include "ReadWrite.h" #include "Graph.h" void main(int doiso, char *thamso[]) { GRAPH G; int rf=G.ReadData(thamso[1]); if(!rf) printf("Khong doc duoc file!\n"); else { printf("Doc duoc file!\n"); G.GraphAlgorithm(); int wf=G.WriteData(thamso[2]); if(wf) printf("Ghi file thanh cong!"); } getch(); }
//******************************Graph.cpp*********************************#include #include #include "Graph.h" int GRAPH::ReadData(char *FileName) { FILE *fp=fopen(FileName,"rt"); if(!fp) return 0; fscanf(fp,"%d",&n); B=new unsigned char *[n]; unsigned char *temp=new unsigned char [n]; for(int d=0; d //***********************Graph.h************************************** `class GRAPH { private: int n; int label; int *LabelLT; unsigned char **B; public: int ReadData(char *FileName); const int WriteData(char *FileName); void GraphAlgorithm(); void Visit(int i); };` Help me, make virtual method in my project! <(-|-)> "To be or not to be"
what function do you want to be virtual!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you