This is the first time I've ever seen this error, I have no idea what it means.
(Borland Bcc32 compiler ... Windows XP)
Error E2062 C:\*File* 693: Invalid indirection in function PlatBreaker()
I'm dumbstruck by this error -,-. I'll post the code, but I'd rather someone just tell me what the error is >.>.
Here the function:
And the platform code:Code:void PlatBreaker() { int it; int x, y; for(x=0; x <= Plats; x++) if(Plat[x].IsBroken()) { if(Plats[x].GetFlag() == 0) { Plat[x].SetPc(25); Plat[x].SetFlag(1); } if(Plat[x].GetFlag() == 1 && Plat[x].GetPc() > 0) Plat[x].RemovePc(); if(Plat[x].GetFlag() == 1 && Plat[x].GetPc() == 0) Plat[x].SetFlag(2); if(Plat[x].GetFlag() == 2) { Plat[x].Break(); Plat[x].Null(); return; } } return; }
Thanks for your time!Code:#include <windows> #include <iostream> #include <string> #include <conio> #include <fstream> #include <vector> using namespace std; HANDLE hOt = GetStdHandle(STD_OUTPUT_HANDLE); HANDLE hIn = GetStdHandle(STD_INPUT_HANDLE); WORD Scolor; CONSOLE_SCREEN_BUFFER_INFO inf; void SetColor(char c) { if(c == 'o') SetConsoleTextAttribute(hOt, Scolor); if(c == 'r') SetConsoleTextAttribute(hOt, FOREGROUND_RED | FOREGROUND_INTENSITY); if(c == 'g') SetConsoleTextAttribute(hOt, FOREGROUND_GREEN | FOREGROUND_INTENSITY); if(c == 'b') SetConsoleTextAttribute(hOt, FOREGROUND_BLUE | FOREGROUND_INTENSITY); if(c == '1') SetConsoleTextAttribute(hOt, BACKGROUND_RED | BACKGROUND_INTENSITY); if(c == '2') SetConsoleTextAttribute(hOt, BACKGROUND_GREEN | BACKGROUND_INTENSITY); if(c == '3') SetConsoleTextAttribute(hOt, BACKGROUND_BLUE | BACKGROUND_INTENSITY); if(c == 's') SetConsoleTextAttribute(hOt, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY); } char ReadPos(SHORT x, SHORT y, SHORT ix=0, SHORT iy=0) { DWORD reader; COORD Pos; char EEE[1]; SHORT v; Pos.X = x + ix; Pos.Y = y + iy; ReadConsoleOutputCharacter(hOt, &EEE[0], 1, Pos, &reader); return EEE[0]; } class Platform { private: SHORT Strength; SHORT SteppedOn; SHORT x; SHORT y; SHORT Pcounter; SHORT Flag; public: Platform() {Strength=1; SteppedOn=0; x=0; y=0;Pcounter=0;Flag=0;} Platform(SHORT str, SHORT Step, SHORT x_pos, SHORT y_pos) {Strength=str; SteppedOn=Step; x=x_pos; y=y_pos;Pcounter=0;Flag=0;} void Set(SHORT str, SHORT Step, SHORT x_pos, SHORT y_pos) {Strength=str; SteppedOn=Step; x=x_pos; y=y_pos;Pcounter=0;Flag=0;} SHORT GetX() const {return x;} SHORT GetY() const {return y;} SHORT GetStr() const {return Strength;} SHORT GetWStatus() const {return SteppedOn;} SHORT GetPc() const {return Pcounter;} SHORT GetFlag() const {return Flag;} SHORT operator==(Platform q); SHORT IsNull(); SHORT IsBelow(COORD b); SHORT IsBroken(); void SetStr(int D) {Strength=D;} //61 void SetStep(int D) {SteppedOn=D;} void SetX(int D) {x=D;} void SetY(int D) {y=D;} void SetPc(int D) {Pcounter=D;} void SetFlag(int D) {Flag=D;} void AddStep() {++SteppedOn;} void RemovePc() {--Pcounter;} void Null() {Strength=-1; SteppedOn=0; x=0; y=0;} void Break(); Platform GetPlat(COORD Pos); COORD GetPos() {COORD b; b.X = x; b.Y = y; return b;} void Redden(); void Reset() {Strength=1; SteppedOn=0; x=0; y=0;} }; SHORT Platform::operator==(Platform q) { if(q.GetX() == this->GetX() && q.GetY() == this->GetY() && q.GetStr() == this->GetStr() && q.GetWStatus() == this->GetWStatus()) return 1; return 0; } SHORT Platform::IsBelow(COORD b) { if(b.X == this->GetX() && ++b.Y == this->GetY()) return 1; return 0; } SHORT Platform::IsNull() { static Platform K(-1, 0, 0, 0); if(*this == K) return 1; return 0; } SHORT Platform::IsBroken() { if(this->GetWStatus() >= this->GetStr()) return 1; return 0; } void Platform::Redden() { SetConsoleCursorPosition(hOt, this->GetPos()); SetColor('r'); cout << '-'; SetColor('o'); } void Platform::Break() { SetConsoleCursorPosition(hOt, this->GetPos()); cout << ' '; this->Null(); }



LinkBack URL
About LinkBacks


