|You can even write inline assembly to manipulate everything. But the question is: Do you really need to do it, given that you're already using a framework which makes things much more simpler?
I am saying that you should not be using std::string in an MFC program. But given that CString does everything that you need to, I simply fail to see any justification for using std::string. (OK, you're manipulating files? Then you could use CFile or CStdioFile or ...).
And why do I use MFC when I can do everything with vanilla C or C++? Because I'd like to leave for home at 5.
I may use something like an std::string within an MFC program very rarely (may be I'm using some third party code and a function expects a reference to an std::string, or whatever)...
sadman89 wrote:drive when I click the Open button. my code for it is:
You are again providing code in bits and pieces. That works for me and I can't tell you why it didn't work in your case unless I can see the whole of your code (relevant code, please).
See if this helps:
cfd.m_pOFN->lpstrInitialDir = _T("C:\\");
if(cfd.DoModal == IDOK)
szStr = cfd.GetFileName();
It is a crappy thing, but it's life -^ Carlo Pallini