All pastes #180560 Raw Edit

Miscellany

public cpp v1 · immutable
#180560 ·published 2006-09-23 09:31 UTC
rendered paste body
#include "module.h"class TestModule : public IRCModule {	public:		TestModule();		~TestModule();};TestModule::TestModule() {	info->author = new char[strlen("Shane Poage")+1];	strcpy(info->author, "Shane Poage");	info->id = new char[strlen("TEST")+1];	strcpy(info->id, "TEST");	info->name = new char[strlen("Test Module")+1];	strcpy(info->name, "Test Module");	info->version = new char[strlen("0.1")+1];	strcpy(info->version, "0.1");	printf("Author: %s\n", info->author);}TestModule::~TestModule() {	//}extern "C" {	IRCModule *GiveModulePtrToProg() {		return new TestModule;	}}