Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


End of file not expected

This topic is 5450 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is what I have, and when I try and compile it, I get the following error on the line: #include "Tile.h" This is Tile.cpp
#include "Tile.h"

Tile::Tile(void) {
	currentFrame = 0;
	timer = 0;
	alpha = 255;

Tile::~Tile(void) {
	for(int x = 0; x < int(bitmap.size()); x++) {

void Tile::Show(int x, int y, int alpha) {
	if(bitmap.size() > 0) {
		Manager.Draw(bitmap[currentFrame], x, y);

void Tile::addFrame(char* path) {
	BITMAP *t = load_pcx(path, NULL);
	if(t != NULL) {
		resX = t->w; resY = t->h;

void Tile::addFrame(BITMAP *t) {
	BITMAP *x = create_bitmap(t->w, t->h);
	draw_sprite(x, t, 0, 0);
	if(t != NULL) {
		resX = x->w; resY = x->h;

int Tile::getFrames() {
	return int(bitmap.size());

int Tile::getCurrentFrame() {
	return currentFrame;
This is externals.h
#include <allegro.h>
#include <winalleg.h>
#include <string>
#include <vector>
#include "System.h"
#include "TileMap.h"
#include "Tile.h"

using namespace std;

extern class System Manager;
And finally this is Tile.h
#pragma once
#include "externals.h"

class Tile {
	void Show(int x, int y, int alpha = -1);
	void addFrame(char* path);
	void addFrame(BITMAP *t);
	int getFrames();
	int getCurrentFrame();
	int				resX, resY;
	vector<BITMAP*>	bitmap;
	int				currentFrame;
	int				timer;
	int				alpha;
I am using MSVC++ .NET if that means anything. Every other class compiles fine, just my Tile class won't compile because of this end of file not expected error. [edited by - Kranar on October 21, 2003 6:18:30 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!