Hopefully this won't sound as stupid to you as it does to me, and if it does, then hopefully it will be a really easy question.
I need to get some information out of my Projectwise program that I can feed into another program. Either being able to copy and paste the information or being able to write it out to a text file would be great. I have not been able to get the project to find any of the fstream, iostream headers. I have tried using printf, and while it compiles and runs, the output doesn't show up anywhere that I could find.
I am using VS 2010 on windows 7 and PW SS2
Thank-you, John
That worked like a charm. You have made my day!
If your VS project can't "find any of the fstream, iostream headers", perhaps you didn't install them when you installed VS. Rerun the installation program and make sure that you have installed the "Standard C++ Libraries".
I have used "CStdioFile" to create text files, it is part of MFC. Here's a link about it:
msdn.microsoft.com/.../a499td6y(v=vs.80).aspx
HTHs
Since you are on Windows 7, you will not be able to create a file in c:\ (C root) or under Program Files. I am not on Win7 yet (we are testing).
here is an old snipit that may work for you
void WriteLineToLog(CString Line)
{
FILE *fp;
COleDateTime now = COleDateTime::GetCurrentTime();
CString str;
str.Format(_T("%s - %s\n"),Line,now.Format(_T("%H:%M:%S")));
_tprintf(str);
_tfopen_s(&fp,_T("C:\\Users\\Public\\CreatePWFolders.log"),_T("at"));
fputws(str.GetBuffer(0),fp);
fclose(fp);
}