HMehrpouya 0 Newbie Poster

I want to have two classes one for creating the dataset as a factory class and the other is my Dataset class. factory class could read data from files or memory address and also it can create random data and finally returns a dataset. first i want to implement the random data methode and return a dataset from it. I Don't know what is the best way for defining my dataset class and how to use the factory class. let's say we have three classes 1.main.cpp , 2.Dataset 3.FactoryDataset how should i declare the variables and pass them between classes. The data structure i used for holding the data is my customized structure

struct MyDoublePoint {double x ; double y ;}

then i use std vector for holding the points. and also please tell me where should i declare the vector variable in the dataset class i mean should i declare it as static member private or public? sorry I'm not used to c++. thank you.

CDataSet  CDSFactory::GenerateDS ( const double minX, const  double maxX, const  double minY, const  double maxY, const  int recordCount)
	//holding variables withing the class for further use
	//generating data and calculating the min and max value for X , Y
	int end=recordCount-1;
	MyDoublePoint myPoint;

		for ( int index = 0 ; index < end ; index+=1 )
		return m_ds;// i don't know how to return the data set and also where to declare it