How do I get the user name of the current user?

后端 未结 6 1492
醉梦人生
醉梦人生 2021-01-14 20:05

I want to access the user name in the Windows using C programming and use that name to create the path to the particular file like \"c:\\users\\john\\Roaming.....and so on\"

6条回答
  •  无人及你
    2021-01-14 20:55

    The function to get user name on windows is GetUserName

    This answer, probably, will help you too.

提交回复
热议问题