Skip to content

Doesn't build #5

Open
Open
@yves-chevallier

Description

Unfortunately it doesn't seem to build :(

$ git rev-parse master
81d098d9b51fb0bb383cecad0af2b6ece945f671
$ make
g++ -c -g Boid.cpp
g++ -c -g Flock.cpp
In file included from Flock.cpp:2:
Flock.h:22:11: error: ‘Boid& Flock::getBoid(int)’ cannot be overloaded with ‘Boid Flock::getBoid(int)’
   22 |     Boid &getBoid(int i);
      |           ^~~~~~~
Flock.h:21:10: note: previous declaration ‘Boid Flock::getBoid(int)’
   21 |     Boid getBoid(int i);
      |          ^~~~~~~
Flock.cpp:20:7: error: no declaration matches ‘Boid& Flock::getBoid(int)’
   20 | Boid &Flock::getBoid(int i)
      |       ^~~~~
Flock.cpp:14:6: note: candidate is: ‘Boid Flock::getBoid(int)’
   14 | Boid Flock::getBoid(int i)
      |      ^~~~~
In file included from Flock.cpp:2:
Flock.h:14:7: note: ‘class Flock’ defined here
   14 | class Flock {
      |       ^~~~~
make: *** [makefile:21: Flock.o] Error 1

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions