Try making the TCHAR const or as of now you can go for something like const char as well because you dont need to confuse what is T there.