Author
anonymous
almost 7 years ago
Language
C++
Compiler
gcc HEAD 9.0.1 20190317 (experimental)
Options
Warnings
Boost 1.69.0
C++2a(GNU)
no pedantic
Author
anonymous
almost 7 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/gcc-head/include -std=gnu++2a prog.cc:1:6: error: 'Fireball' has not been declared
1 | void Fireball::Update(double dt)
| ^~~~~~~~
prog.cc: In function 'void Update(double)':
prog.cc:3:14: error: 'DestX' was not declared in this scope
3 | double dx = DestX - X;
| ^~~~~
prog.cc:3:22: error: 'X' was not declared in this scope
3 | double dx = DestX - X;
| ^
prog.cc:4:14: error: 'DestY' was not declared in this scope
4 | double dy = DestY - Y;
| ^~~~~
prog.cc:4:22: error: 'Y' was not declared in this scope
4 | double dy = DestY - Y;
| ^
prog.cc:6:17: error: 'sqrtf' was not declared in this scope
6 | float length = sqrtf(dx*dx + dy * dy);
| ^~~~~
prog.cc:8:16: error: 'MaxVelocity' was not declared in this scope
8 | if (length <= MaxVelocity)
| ^~~~~~~~~~~
prog.cc:10:3: error: 'Alive' was not declared in this scope
10 | Alive = false;
| ^~~~~
prog.cc:13:3: error: 'Entity' was not declared in this scope
13 | Entity* d = new Entity(e);
| ^~~~~~
prog.cc:13:11: error: 'd' was not declared in this scope; did you mean 'dy'?
13 | Entity* d = new Entity(e);
| ^
| dy
prog.cc:13:19: error: expected type-specifier before 'Entity'
13 | Entity* d = new Entity(e);
| ^~~~~~
prog.cc:19:16: error: 'r' was not declared in this scope
19 | d->LoadImage(r, "gfx/" + (std::string)"shotdecal.bmp");
| ^
prog.cc:19:34: error: 'string' is not a member of 'std'
19 | d->LoadImage(r, "gfx/" + (std::string)"shotdecal.bmp");
| ^~~~~~
prog.cc:1:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
+++ |+#include <string>
1 | void Fireball::Update(double dt)
prog.cc:21:18: error: 'SDL_GetTicks' was not declared in this scope
21 | d->DeathTime = SDL_GetTicks() + 10000;
| ^~~~~~~~~~~~
prog.cc:22:5: error: 'e' was not declared in this scope
22 | (*e).push_back(d);
| ^
prog.cc:28:17: error: 'MaxVelocity' was not declared in this scope
28 | X += dx * dt * MaxVelocity;
| ^~~~~~~~~~~
prog.cc:32:2: error: 'SDL_Rect' was not declared in this scope
32 | SDL_Rect pr = { p->X, p->Y, p->Width*SCALE, p->Height*SCALE };
| ^~~~~~~~
prog.cc:33:10: error: expected ';' before 'r'
33 | SDL_Rect r = { X, Y, Width *SCALE, Height * SCALE };
| ^~
| ;
prog.cc:35:27: error: 'pr' was not declared in this scope
35 | if (SDL_HasIntersection(&pr, &r))
| ^~
prog.cc:35:32: error: 'r' was not declared in this scope
35 | if (SDL_HasIntersection(&pr, &r))
| ^
prog.cc:35:6: error: 'SDL_HasIntersection' was not declared in this scope
35 | if (SDL_HasIntersection(&pr, &r))
| ^~~~~~~~~~~~~~~~~~~
prog.cc:37:3: error: 'Alive' was not declared in this scope
37 | Alive = false;
| ^~~~~
prog.cc:38:3: error: 'p' was not declared in this scope
38 | p->Health -= AttackDamage;
| ^
prog.cc:38:16: error: 'AttackDamage' was not declared in this scope
38 | p->Health -= AttackDamage;
| ^~~~~~~~~~~~
prog.cc:42:31: error: 's' was not declared in this scope
42 | for (unsigned int i = 0; i < s->size(); i++)
| ^
prog.cc:44:28: error: 'r' was not declared in this scope
44 | if (SDL_HasIntersection(&r, &((*s)[i].Rect)))
| ^
prog.cc:44:7: error: 'SDL_HasIntersection' was not declared in this scope
44 | if (SDL_HasIntersection(&r, &((*s)[i].Rect)))
| ^~~~~~~~~~~~~~~~~~~
prog.cc:46:4: error: 'Alive' was not declared in this scope
46 | Alive = false;
| ^~~~~
Exit Code:
1