Sunday, March 13, 2011

Sometime I just hate C++

Sometimes I just hate C++.

Like now...
I made a class called "FileAgent", this class has the following method:
 std::string FileAgent::createTmpFile( std::string &content) 

This method creates a temporary file with a random name.
It returns the name of the temporary file and puts a newly created object "FileHandle" in a list where all temporary files gets managed and deleted if they have surved they purpose.

Sounds great, doesn't it?...

I just wanted to test the function before going to sleep, but it turns out that SOMEHOW it is not possible to return an std::string from an DLL to an Executable.

I then tried to return the filename as a c string but that also didn't worked so well (the filename looked like shit).

I guess I have to redesign that somehow to make it work...Damnit...

No comments:

Post a Comment