Im new to cheat engine and auto assembler btw

I made a solitaire hack program in c++
I made it so when you press 'Q' it edits the score in solitaire to a random number between 200 and 10000.
I do this by
Code:
bool ChangeMemoryValue(int newData, LPVOID address) {
	HANDLE process = OpenProcess(PROCESS_ALL_ACCESS, FALSE, process_ID);
	if (!process) {
		return false;
	}
	DWORD dataSize = sizeof(newData);
	if (!WriteProcessMemory(process, address, &newData, dataSize, NULL)) {
		return false;
	}
	CloseHandle(process);
	return true;
}



				case 'Q':
					int random = rand() % 10000 + 200;
					if (!ChangeMemoryValue(random, (LPVOID)0x003FA694)) {
						messge = "Failed to edit memory address";
						MessageBox(NULL, messge, "Failzorz", MB_ICONINFORMATION|MB_SETFOREGROUND);
						PostQuitMessage(0);
					}
					break;

The pointer that I got in cheat engine for score was P->003FA694 so I copied it as 0x003FA694 when I restarted solitaire the pointer changed. Am I doing something wrong or is solitaire just annoying like that?