helloworld.cpp

来自「Visual C++串口通信开发入门与编程实践」· C++ 代码 · 共 20 行

CPP
20
字号
// HelloWorldVC6.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"


int main(int argc, char* argv[])
{

	char lpBuf[]="Hello World!";
	FILE* pFile=fopen("COM1","w");
	if (pFile==NULL)
	{
		return 1;
	}
	fwrite(lpBuf,sizeof(char),strlen(lpBuf),pFile);
	fclose(pFile);
	return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?