Moving Files wont work?

I have this simple code here, wanting to move this file,

eventually im going to make a program that will automatically organize my files. but for some reason, i cant figure out how to make the files move.

here's my code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
#include <Windows.h>
#include <WinBase.h>
#include <string>

using namespace std;

int main()
{
	string OldFile("C:\Users\LizardRock\Desktop/CALI.exe");
	string NewFile("C:\Users\LizardRock\Desktop\caliHere/ILAC.exe");
	cout<< "ready?" <<endl;
	cin.get();

	BOOL WINAPI MoveFile(
  __in  LPCTSTR OldFile,
  __in  LPCTSTR NewFile
);
}
anybody? i still havent figured this out
If you cannot tell apart a function declaration from a function call, you need to get back to the basics first.
Start with this: http://www.amazon.com/Primer-4th-Edition-Stanley-Lippman/dp/0201721481

Also, backslashes are escape characters in string literals - as such, an actual backslash is represented by \\.
Last edited on
Topic archived. No new replies allowed.