#include <stdlib.h> #include <Windows.h> #include <Tchar.h> HANDLE wHnd; // Handle to write to the console. HANDLE rHnd; // Handle to read from the console. int _tmain(int argc,_TCHAR* argv[]) { // Set up the handles for reading/writing: wHnd = GetStdHandle(STD_OUTPUT_HANDLE); rHnd = GetStdHandle(STD_INPUT_HANDLE); // Change the window title: SetConsoleTitle(TEXT("Win32 Console Control Demo")); // Set up the required window size: SMALL_RECT windowSize = {0,79,49}; // Change the console window size: SetConsoleWindowInfo(wHnd,TRUE,&windowSize); }
这样的一些错误被报告:
'SMALL_RECT' : illegal use of this type as an expression missing ';' before identifier 'windowSize'
启动 – 重新启动shell脚本的function
AttributeError:StringIO实例没有属性'encoding'
Bash-Command获取当前networking带宽使用情况和cpu使用情况
Windows:如何以大小和最后访问daterecursion列出文件?
如何获得当前的控制台背景和文字颜色?
您正在使用仅支持现在古老的C90标准的MS C编译器。 所有的变量必须在函数体的顶部声明。
int _tmain(int argc,_TCHAR* argv[]) { // Set up the required window size: SMALL_RECT windowSize = {0,49}; // Set up the handles for reading/writing: wHnd = GetStdHandle(STD_OUTPUT_HANDLE); rHnd = GetStdHandle(STD_INPUT_HANDLE); // Change the window title: SetConsoleTitle(TEXT("Win32 Console Control Demo")); // Change the console window size: SetConsoleWindowInfo(wHnd,&windowSize); }
痛苦,不是吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。