You can simply load it as a textfile and convert it with sscanf or something, but the bigger question here is ... WHY are you storing a pointer address in a textfile ? Pointer are relative to the space your program is running in and therefor storing it on disk is totally useless.
i have to make two different application, A and B.
A has to verify if B is running and B has to verify if A is running.
A and B are completely different.
You use the OS facilities to determine if a process is running or not, not faulty C++ coding. Do you think that commercial apps that need to know if a service, process, etc. is running use your method?
How does an install program know that a certain app is running, and then asks you to close the app before proceeding the installation? I doubt it has anything to do with volatile variables, since those apps may not even have been coded using C or C++.
Pointers are not permanent. They only exist during the run of an application, and only that application knows about its own pointers. Storing an address is meaningless.
The good/safe way out is that both applications make a named mutex to indicate they are running. This same mutex can also be used to verify that no 2 copies of either peograms are running (if you need to have that feature, you'll need a semaphore instead).
The applications also periodically verify that the named mutex of the other application is available. If not, the other app is still running, if yes, then the other program has stopped running.