0

if you use movefile and ofstream the ofstream file won't be made.. :s any way to solve this?

2
Contributors
7
Replies
8
Views
8 Years
Discussion Span
Last Post by qeinar
0

what operating system and compiler are you using? Do you mean the version in my last link? If not, then provide link to it because there is no standard C or C++ library function.

0

i use visual express c++. gonna post the part of my code..

#define KEY "C:\\Users\\qeinar\\hmm.exe"

int main(int argc, char **argv)
{
MoveFile(argv[0], KEY);


ofstream fout;
fout.open("hmmgetasynckey.txt");

}

(ofc theres more there but it's alot so.. :P but nothing that would screw over these comands.. since i've tested it elsewhere withotu the rest of the code.. just something abit more simple.. ^^)

0

>>MoveFile(argv[0], KEY);
That will always fail because you can not move a currently running program, and argv[0] contains the name of the program you are writing.

0

close/deleate the thread please.. i solved it by changing the fout.open loc.. o.o' stupid me..

0

>>MoveFile(argv[0], KEY);
That will always fail because you can not move a currently running program, and argv[0] contains the name of the program you are writing.

well wierd 'cus it seems i can.. ^^

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.