可以修改前景色(字体颜色)和背景色。
示例代码如下:
#include
#include //需要引用Windows.h
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
HANDLE hConsole;
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
for(int i...
分类:
编程语言 时间:
2014-06-20 12:38:55
阅读次数:
279
不要让main函数返回void
//在C++中绝对没有出现过 void main(){ }这样的函数定义,在C语言中也是。
//两种 main 的定义方式:int main( void );
// int main( int argc, char** argv )
//第一版的C语言中只有
int 一种数据类型,为了兼容
需要,不明确标明...
分类:
其他好文 时间:
2014-06-20 09:49:05
阅读次数:
207
1.点击程序图标,打开程序2.执行main函数,分析如下:int main(int argc,
char * argv[]){ @autoreleasepool { /* argc: 系统或者用户传入的参数个数 argv: 系统或者用户传入的实际参...
分类:
移动开发 时间:
2014-06-11 13:26:09
阅读次数:
239
ssh
narnia3@narnia.labs.overthewire.org密码:OOXX(上一关拿到的密码)cat narnia3.c#include
#include #include #include #include #include #include int main(int argc....
分类:
其他好文 时间:
2014-06-11 09:59:03
阅读次数:
347
#include #include #include #include #include
#include #define BUFFER_SIZE 1024int main(int argc, char *argv[]){ int fd; char
buffer[BUFFER_SIZE]...
分类:
系统相关 时间:
2014-06-09 16:29:07
阅读次数:
428
#include #include #include #include #include using
namespace std;ifstream& open_file(ifstream&,const string&);int
main(int argc, char **argv){ map ...
分类:
编程语言 时间:
2014-06-09 00:04:20
阅读次数:
334
关于+ - ~有意思的一段C代码
问题是钟哥几天前在automation的群里面抛出来的。
code:
#include
int main(int argc,char* argv[])
{
int a = 7;
int b = 1;
printf("before process,a = %d,b = %d\n",a,b);...
分类:
其他好文 时间:
2014-06-08 16:29:03
阅读次数:
215
1.client: 1 #include "iostream" 2 #include
"windows.h" 3 4 using namespace std; 5 void main(int argc,char* argv[]) 6 { 7
LPCTSTR Mess...
// ConsoleApplication1.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include
#include
#include
#include
#include
#include
#include
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
i...
分类:
编程语言 时间:
2014-06-08 03:24:24
阅读次数:
357
typedef unsigned char* byte_pointer;
void show_bytes(byte_pointer start, int len)
{
for (int i = 0; i
{
printf("%2x", start[i]);
}
cout
}
int _tmain(int argc, _TCHAR* argv[])
{
char* b...
分类:
其他好文 时间:
2014-06-07 16:22:02
阅读次数:
312