   unexpected end of file
//units.cpp#include "units.h"void units::Insert(int id,int x, int y, int z ){for(int i = 0 ; i < 128; i++){if(!Factors.On){...//header units .h#pragma once#include "factor.h"#include "i3x.h"class units{void Travel(int i, int milis);factor Factors[128];int ID[1024];int milis;// max x 128i3x Compas[3584];void PlusX(int I);void PlusY(int I);void PlusZ(int I);void MinusX(int I);void MinusY(int I);void MinusZ(int I);void FactorCheck(int milis);void Insert(int id, int x, int y, int z);};im getting the error in the first line of the cpp file but really can`t understand what`s up with the header#pragma oncestruct i3x{public:int x;int y;int z;};#pragma oncestruct factor{public:int kAlt;int kX;int kZ;int X;int Z;int Y;int sX;int sY;int sZ;int fX;int fY;int fZ;int eX;int eY;int eZ;bool On;bool Move;bool Firing;int PathCount;int PathStep;int mperMLsecond;int Chart;//north, south int Dir;};[Edited by - Calin on April 7, 2010 10:05:45 AM]
  Is your project set to use a precompiled header? Might sound like a stupid question but that's only the time I usually get that error.   ;  Not really sure, but why do you have a semi colon after your unit class?   ;  It's his prototype definitions for units. It has to have a semicolon there.[EDIT]It might be worth checking you haven't forgotten to add in the semicolon in "factor.h" and "i3x.h" but I'm pretty sure it would give you a different error like "units is not a class or namespace"   ;  c++ requires semicolons after class and struct definitions.   ;  Havn't you missed a public: in that class defenition?   ;  it`s not set to use precompiled headers------added public , though don`t think it`s required   ;Quote:Original post by r1nuxHavn't you missed a public: in that class defenition?this is not mistake for now...   ;  "unexpected end of file"Is that the full error message or is there more?Do you get more errors after that?   ;  that`s the only error, the error code c1004 , unexpected end-of -file found   