- 最後登錄
- 2023-1-13
- 在線時間
- 0 小時
- 註冊時間
- 2015-8-27
- 閱讀權限
- 10
- 精華
- 0
- UID
- 1623919
- 帖子
- 0
- 積分
- 0 點
- 潛水值
- 930 米
| 我這樣寫會有錯耶@@- #include <stdio.h>
- #include <stdlib.h>
- #include <Windows.h>
- #include <conio.h>
- int main()
- {
- //取得 console 視窗
- HWND hWnd = GetConsoleWindow();
- //MoveWindow() : 移動視窗、設定視窗大小
- //x1、 y1 : 視窗左上座標;x2、y2 : 視窗右下座標
- //MoveWindow(hWnd,x1,y1,x2,y2,1);
- MoveWindow(hWnd,0,0,30,30,1);
-
- system("pause");
複製代碼
錯誤:
第10行 [Warning] initialization makes pointer from integer without a cast
[Linker error] undefined reference to `GetConsoleWindow'
10 ld returned 1 exit status
應該是我寫的方式錯了吧??
麻煩高手教我,感謝^^... |
|