All pastes #940509 Raw Edit

murd0ck

public cpp v1 · immutable
#940509 ·published 2008-03-13 00:43 UTC
rendered paste body
// the_first.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <cstdlib> #include <string>#include <ctime>#include <iostream>#include "characters.h"using namespace std;int main(){	srand((unsigned)time(0)); 	baseChar *p;	p = new baseChar();	return 0;}//characters.h blah blah these are the character creation and modification functions#pragmaclass baseChar {public:	baseChar();	void generateChar(int sLevel);	void showChar() const;private:	int str;	int dex;	int mind;	int level;};baseChar::baseChar(): str(0), dex(0), mind(0) {}void baseChar::generateChar(int sLevel) {   sLevel += 10;   str = rand() % sLevel;   dex = rand() % sLevel;   mind = rand() % sLevel;}void baseChar::showChar() const {	cout << "Strenth: " << str << " Dexterity: " << dex << " Mind: " << mind << endl;}