Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Create File at Starup Error

zacoryzacory Member Posts: 2
I have a program that maintains a log file. The file is created at the start of the program and appended to as needed. The program works fine in typical operation, but I added it to my "Run at windows startup" list and the log file is not where I placed it. According to fstream::is_open the file opened correctly and I never receive any errors when I use the stream, but the file is just not there.

I know the simple solution would be to place the data in a buffer and create the file when it is needed to be written (hopefully far after windows startup), but I am more interested in why the file isn't created and why I receive no errors. Is there a way to account for this other than rewriting the where and when of opening the file?


  • AsmGuru62AsmGuru62 Member Posts: 6,519
    [color=Blue]What file path/name did you use to open that log file?[/color]
  • zacoryzacory Member Posts: 2
    I was using the relative path "test.txt", but I was set straight by a friend of mine to use absolutes like "c: est.txt". Switching to absolute paths has solved my problem.
Sign In or Register to comment.