vc++ 获取当前用户名时间:2023-03-08 15:56:57 #include<afxwin.h> #include <stdio.h> int main(void) { char userName[MAX_PATH]; unsigned long size=MAX_PATH; GetUserName(userName,&size); printf("我是%s\n",userName); ; } 做作业的时候用到了...所以贴上来...T.T