I'm having a little trouble returning the current date from a dll function.
Here is my code
LPSTR __stdcall date()
{
int i;
char dateStr [10];
_strdate( dateStr);
LPSTR string = "";
for (i = 0; i < 10; i++)
{
string += dateStr[i];
}
std::cout<<dateStr<<"\n";
return dateStr;
}
I cant get the return from it when called, but it will output to the console the correct date.
I'm hoping someone can help me understand why.
There are a number of other functions in the dll that all work fine.
(edit) the return from the call is blank.
Suze.