step4.cpp

来自「mini http server,可以集成嵌入到程序中,实现简单的web功能」· C++ 代码 · 共 38 行

CPP
38
字号

/*
 * Step 4: Initialize the program database functionality and
 * write a simple hello world.
 */

#include <iostream.h>
#include <stdlib.h>

#include "Pi2API.h"

/* ---
--- */
int iRet;
void Step4( PIDB *pDB )
{
	cout << "Program running on " << PIPlatform_getDescription() << endl;
	cout << "Dumping the program DB:-" << endl;
	PIProgram_dbgDump( pDB, 0 );
	cout << "Done" << endl;
	cout << "Hello World" << endl;
	iRet = 0;
}

/* ---
--- */
int main()
{
	if ( PIProgram_enter( "dummy", PIPROGRAM_VERSION_1_0, Step4 ) )
		{
		cerr << "Program_enter() failed." << endl;
		exit( 1 );
		};

	return iRet;
}

⌨️ 快捷键说明

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