I've found some tutorials about getting all file names in directory or etc. But how to get current file name. For example if I open file "clientbla.exe" ir will cout in the concole "clientbla.exe", if I rename it, it would show different, renamed value.
What do you mean? You want to get the filename of the program you're running (i.e. a program called "helloworld.exe" printing "Hello world from helloworld.exe!")?
Very simple.
Declare main like this: int main(int argc, char** argv)
or int main(int argc, char* argv[])
argv[0] is the name of the program. So in our "helloworld.exe" program:
1 2 3 4 5
#include <iostream>
int main(int argc, char** argv) {
std::cout << "Hello world from " << argv[0] << "!\n";
}
that is, of course, if this is in fact what you're asking; because your question is very hard to interpret.
Ar, I'm in over my head here. I can only just remember what an LPCTSTR is and that was something I found on the fly when I was trying to help someone with something I forget. That was like a week ago.
Sorry I can't help you with this; it's just, I strive not to use windows except to play games, so naturally I've forgotten what little I did know about the API (I could create a basic window, nothing more). I was hoping, when I saw this, that it was one of those occasional threads on the windows programming board that belong in "General C++ programming". But as for LCPTSTRs; I know nothing about them.