O
ofranko
this seem to be working better... i have the system date in a char
array.(it's the only way i could find) .. char dateBuffer1[10] i
need to get to std::string theDateBuffer ..any ideas?
class TheDate
{
public:
TheDate(std::string initialDateBuffer);
~TheDate();
std::string GetDateBuffer();
void SetDateBuffer(std::string dateBuffer);
//void DisplayDate(std::string theDateBuffer[9]);
private:
std::string theDateBuffer;
char dateBuffer1[10];
};
TheDate::TheDate(std::string initialDateBuffer)
{
theDateBuffer = initialDateBuffer;
}
TheDate::~TheDate()
{
}
std::string TheDate::GetDateBuffer()
{
cout <<"GetDateBuffer()\n";
return theDateBuffer;
}
void TheDate::SetDateBuffer(std::string dateBuffer)
{cout<< "SetDateBuffer()";
// dateBuffer doesn't work this way
dateBuffer = _strdate_s( dateBuffer1);//gets system date
}
array.(it's the only way i could find) .. char dateBuffer1[10] i
need to get to std::string theDateBuffer ..any ideas?
class TheDate
{
public:
TheDate(std::string initialDateBuffer);
~TheDate();
std::string GetDateBuffer();
void SetDateBuffer(std::string dateBuffer);
//void DisplayDate(std::string theDateBuffer[9]);
private:
std::string theDateBuffer;
char dateBuffer1[10];
};
TheDate::TheDate(std::string initialDateBuffer)
{
theDateBuffer = initialDateBuffer;
}
TheDate::~TheDate()
{
}
std::string TheDate::GetDateBuffer()
{
cout <<"GetDateBuffer()\n";
return theDateBuffer;
}
void TheDate::SetDateBuffer(std::string dateBuffer)
{cout<< "SetDateBuffer()";
// dateBuffer doesn't work this way
dateBuffer = _strdate_s( dateBuffer1);//gets system date
}