Hi Michael,
this is a simple C++ task and has nothing to do with MSX
incomplete Sample Code
...
LPSTR l_pszFileName = (LPSTR)(l_szFileName);
//create Output File
HANDLE hFile = CreateFile(l_pszFileName,GENERIC_WRITE,0,0,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,0);
// Output File is generated
if(hFile != INVALID_HANDLE_VALUE)
{
CloseHandle(hFile);
FILE *l_pszResultFile;
l_pszResultFile = fopen(l_pszFileName,"w+");
....
// Now you can add all information to the file, maybe something like this
char buffer[1000];
p = sprintf( buffer,"%s\\n", var1);
p += sprintf( buffer + p,"%s\\n", var2);
p += sprintf( buffer + p, "%5d", var3 );
// add your text to the file
fputs(buffer,l_pszResultFile);
....
// close the file
fclose(l_pszResultFile);
// if you like, you can open this file in Notepad with this call
ShellExecute(NULL, "open", "notepad.exe", l_pszFileName, NULL, SW_SHOW);
Ok? :D