Hey there all. I'm an aspiring C++ coder like a lot of people here, and aspiring coders usually have questions like myself. (Note, all questions are console related, not with GUI commands)
1.) Launching another program from your program
I have no idea if it is or not, but I would like to know how to launch another program from my own, like a secondary launcher, where if "X" was pressed, "THIS.filetype" would launch. I know this is possible with *.bat files, by typing the directory and then the file name and extension, but it isn't very useful if you only want to launch a certain program and don't want 20 *.bat files on your Desktop or wherever you plan to store it.
2.) Making the program write a file (Updated) I know this is possible, I've seen programs do it millions of times. I would like to know how to make my executable write a simple text file as a log. Such as when "The answer is ..." appears in my program, it would be dumped into a text file. I got that down, but now I'd like to know how to make it where the program doesn't overwrite the existing contents.
I don't believe you can just "launch" a program without resorting to some OS specific commands...there might be a library out there with something about that however, you could try searching for "launch program from console app" or something like that.
1) Lookup the function ShellExecute from the Win32 which gives you more possibilities when launching than system()
2) It has all to do with how you open the file, if you open the file in append mode you will not overwrite.