All pastes #959982 Raw Edit

Mine

public text v1 · immutable
#959982 ·published 2008-03-27 20:23 UTC
rendered paste body
enginetest.cpp:

#include "engine.h"
// THIS IS BAD ACCORDING TO VS2K8!
int main() {
	engine game = new engine(800,600, "Test stuff");
	if(!game.initWasOk) {
		return 1;
	}
	while(game.running) {
		game.Draw();
	}
	return 0;
}
// This compiles fine:

#include "engine.h"

int main() {
	engine *game = new engine(800,600, "Test stuff");
	if(!game->initWasOk) {
		return 1;
	}
	while(game->running) {
		game->Draw();
	}
	return 0;
}

engine.h: 

#pragma once
#define GLFW_BUILD

#pragma comment(lib, "OpenGl32.lib")
#pragma comment(lib, "glu32.lib")
#pragma comment(lib, "glfw.lib")

#include <GL/glfw.h>
#include <iostream>
#include <string>
#include "window.h"
using namespace std;

class engine {
	int width;
	int height; 
	int mouseposx;
	int mouseposy;

	string windowname;
	double time;
	window *testwindow;
public:
	int initWasOk;
	int running;
	void Draw();
	engine(int width, int height, string windowname);
};