I have been using c# fo rth elast few months, and have come back to c++ for research purposes.
I have 2 problems, both of which are irritatingly stupid, so apologies in advance.
1) I have closed down my files in project window, and cannot remmeber the key code or menu option to bring it back. Can anyone remind me?
2) code is below, I can see nothing wrong with the declaration, or implementation, but when I compile I get 2 errors. Removing these files removes the errors, so the problem has to be in there somewhere. Cna anyone see what Im doing wrong?
.h
.cpp
The errors are;
C2143 - missing , before &
C2511 - _Chromosome::_Chromosome(const int) no overloaded member funciton found in _Chromosome
this is slowly driving me doolally, so any help to spot what is wrong will be appreciated
Thanks
K
I have 2 problems, both of which are irritatingly stupid, so apologies in advance.
1) I have closed down my files in project window, and cannot remmeber the key code or menu option to bring it back. Can anyone remind me?
2) code is below, I can see nothing wrong with the declaration, or implementation, but when I compile I get 2 errors. Removing these files removes the errors, so the problem has to be in there somewhere. Cna anyone see what Im doing wrong?
.h
Code:
#pragma once
#include <string>
class _Chromosome
{
public:
//Constructor / Destructors
_Chromosome(void);
_Chromosome(const _Chromosome &T);
virtual ~_Chromosome(void);
private:
std::string baseFName; //FileName
float fVersion; //Version of the code
int nBeamNum;
int nRows;
int nCols;
float rTheta;
float rPhi;
};
.cpp
Code:
#include "StdAfx.h"
#include ".\_Chromosome.h"
_Chromosome::_Chromosome(void)
{
//Get the Root File Path and Name for this Object
//As this is the Class For the Header of Each Air File,
//The Type of File for get_optfile() is 9
// get_optfile(9,1,&BaseFName.c_str());
//Temporary Code
baseFName = "d:/data/inair.";
fVersion = 0.1f;
}
/*
Overloaded Constructor Used for Creating a copy of an Existing Class
*/
_Chromosome::_Chromosome(const _Chromsome& T)
{
nBeamNum = T.nBeamNum;
nRows = T.nRows;
nCols = T.nCols;
rTheta = T.rTheta;
rPhi = T.rPhi;
}
_Chromosome::~_Chromosome(void)
{
}
The errors are;
C2143 - missing , before &
C2511 - _Chromosome::_Chromosome(const int) no overloaded member funciton found in _Chromosome
this is slowly driving me doolally, so any help to spot what is wrong will be appreciated
Thanks
K