Ok i just started C++ about 2 days ago and I have somthing not working and somthing I need to ask, hopfully somone can help me.
Im making a dll to use with a gamemaking software called gamemaker that support using dll's.
oh ya, im using Dev-C++
First, This is not returning 'yes' or 'no', why:
export char* file_write(const char* file_name, const char* file_value){
const char* done = "no";
ofstream EmplRecords(file_name);
EmplRecords << file_value;
if (EmplRecords.fail()){
done = "no";
}else{
done = "yes";
}
EmplRecords.close();
return(char*)done;
}
And second, how do you delete a file that you've writed to? This is my current code:
export char dos_execute(char temp_name, char command){
ofstream EmplRecords(temp_name+".bat");
EmplRecords << command;
EmplRecords.close();
system(temp_name+".bat");
}
Thnx in advance.
~Mini_The_Great