I have my code working well in Visual Studio and windows but in Xcode i have big problems. First and i am wondering after i remove the direct.h include (in Xcode, mac) I get the following error
Also, my objects from classes that i created (this is not related to direct.h) are all not able to be initialised. Xcode doesn't seem to understand any of my constructors. The error message is shown below. The example is for one of my objects. Any help?
Here is one of my classes . Please not that all classes are not loading!!
class p_args{
public:
string ts,par,fxd,dir,dato;
int diFL, RSQtype, runtype, *DATO;
int Snow2GlacierOption,Snow2GlacierJulianDay,parallel;//Added 02-12-2012 (extra arguments in args.txt)
int manual,nopt,nopt2,maxn,kstop;
float pcento;
p_args();~p_args();
void getfnames(int);
};
p_args::p_args(){};
p_args::~p_args(){};
void p_args::getfnames(int plots){//read file names
int i=0;
this->DATO=new int[3];
ifstream inFile;
inFile.open("ARGS.txt",ios::in);
if (inFile.is_open()){
inFile>>this->dir;cout<<"Dir\t"<<this->dir<<"\n";
inFile>>this->ts;cout<<"ts\t"<<this->ts<<"\n";
inFile>>this->par;cout<<"par\t"<<this->par<<"\n";
inFile>>this->fxd;cout<<"fxd\t"<<this->fxd<<"\n";
inFile>>this->diFL; // multiple lapse
inFile>>this->manual;//manual control of calib.
inFile>>this->nopt;
inFile>>this->nopt2;
inFile>>this->maxn;
inFile>>this->kstop;
inFile>>this->pcento;
inFile>>this->dato;cout<<lnz<<"BEGIN =\t"<<this->dato<<"\n";
if(plots==1){ //Use with Grapher
this->DATO = breakdotstring(dato);
cout<<this->DATO[0]<<"-"<<this->DATO[1]<<"-"<<this->DATO[2]<<"\n";
//cin.get();
}
inFile>>this->RSQtype;
if(this->RSQtype==0){cout<<"RSQ = NASH SUTCLIFFE (NSEFF)"<<"\n";} else {cout<<"RSQ = NASH SUTCLIFFE *(1-VOLUMETRIC_ERROR)"<<"\n";}
inFile>>this->runtype;
if(this->runtype==0)cout<<"SIMULATING WITH GIVEN PARAMETERS\n";
if(this->runtype==1)cout<<"PARAMETER STUDY RUN";
if((this->runtype!=0) & (this->runtype!=1) ){cout<<"OPTIMISING RUN";}
cout<<lnz;
inFile>>this->Snow2GlacierOption;//Added 02-12-2012 (extra arguments in args.txt)
cout<<this->Snow2GlacierOption<<"--Snow2GlacierOption\n";
inFile>>this->Snow2GlacierJulianDay;//Added 02-12-2012 (extra arguments in args.txt)
cout<<this->Snow2GlacierJulianDay<<"--Snow2GlacierJulianDay\n";
if(this->Snow2GlacierOption==0)cout<<"Snow Storage On Julian Day["<<this->Snow2GlacierJulianDay<<"] Not Converted to Glacier\n";//Added 02-12-2012 (extra arguments in args.txt)
if(this->Snow2GlacierOption==1)cout<<"Snow Storage On Julian Day["<<this->Snow2GlacierJulianDay<<"] Converted(Zeroed)\n";//Added 02-12-2012 (extra arguments in args.txt)
cout<<lnz;//Added 02-12-2012 (extra arguments in args.txt)
inFile>>this->parallel;//Added 02-12-2012 (extra arguments in args.txt)
//cout<<this->parallel<<"-->1=Parallel/0=Serial Simulation\n";
if(this->parallel==0)cout<<"SERIAL HBV SIMULATIONS\n";//Added 02-12-2012 (extra arguments in args.txt)
if(this->parallel==1)cout<<"PARALLEL HBV SIMULATIONS\nEach simulation is 1 Hydrological year\n";//Added 02-12-2012 (extra arguments in args.txt)
cout<<lnz;//Added 02-12-2012 (extra arguments in args.txt)
inFile.close();
}
}