Puting the path in the output file

JohnW63

I have been trying to direct the output file from a plugin to the users home folder, and then in a specified folder within that. I know I need to combine the following char arrays, but I think I'm running aground with things that I can do with a string and things that work with char arrays.

I want the output file to go to:

%HOMEPATH%\<outputfolder>\<filename I have created>

I'll tell the drivers to make a folder in their home directory called "TireFile" or something before hand, so I don't have to do error checking to see if it's there and then create it , if it's not. I want this to work in WinXP all the way up to Win7, so I think the homepath variable should cover that.

My problem is that I have had trouble taking those three variable and combining them into ONE string or characters so I can use the following to save it all:

ofstream outfile (<combinedoutputfilename>); // where the long sounding variable is the whole path for the output file.

I've defined the variable to hold the output file as " char outputfilename [200]; "

Do I have to convert one of the three parts to a string, before I can use something like homepath+foldername+filename sort of structure ?
 

Back
Top