Coder Social home page Coder Social logo

letraincpp's People

Contributors

antoniovazquezaraujo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

docteurzoidberg

letraincpp's Issues

Errors

Please fix it

``Train.cpp: In member function ‘void Train::move()’:
**Train.cpp:278:21: error: call of overloaded ‘abs(float&)’ is ambiguous**
  if(abs(totalImpulse) >= totalMass){
                     ^
In file included from /usr/include/c++/6/cstdlib:75:0,
                 from ../include/Basic.h:4,
                 from ../include/Train.h:3,
                 from Train.cpp:1:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from ../include/Basic.h:4:0,
                 from ../include/Train.h:3,
                 from Train.cpp:1:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
**Train.cpp:299:54: error: call of overloaded ‘abs(float&)’ is ambiguous**
     consumed = crash(crashedVehicle, abs(totalImpulse),trainDir );
                                                      ^
In file included from /usr/include/c++/6/cstdlib:75:0,
                 from ../include/Basic.h:4,
                 from ../include/Train.h:3,
                 from Train.cpp:1:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from ../include/Basic.h:4:0,
                 from ../include/Train.h:3,
                 from Train.cpp:1:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
**Train.cpp:301:33: error: call of overloaded ‘abs(float&)’ is ambiguous**
      totalImpulse -=abs(consumed);
                                 ^
In file included from /usr/include/c++/6/cstdlib:75:0,
                 from ../include/Basic.h:4,
                 from ../include/Train.h:3,
                 from Train.cpp:1:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from ../include/Basic.h:4:0,
                 from ../include/Train.h:3,
                 from Train.cpp:1:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
**Train.cpp:303:33: error: call of overloaded ‘abs(float&)’ is ambiguous**
      totalImpulse +=abs(consumed);
                                 ^
In file included from /usr/include/c++/6/cstdlib:75:0,
                 from ../include/Basic.h:4,
                 from ../include/Train.h:3,
                 from Train.cpp:1:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from ../include/Basic.h:4:0,
                 from ../include/Train.h:3,
                 from Train.cpp:1:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
**Train.cpp:326:18: error: ‘log’ is not a member of ‘std’**
     setSpeed(1.0/std::log(numStoppedTurns)*150);
                  ^~~
In file included from ../include/Train.h:10:0,
                 from Train.cpp:1:
../include/Selector.h: In instantiation of ‘void Selector<TContainer>::selectNext() [with TContainer = std::deque<RailVehicle*>]’:
Train.cpp:96:29:   required from here
../include/Selector.h:24:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    if(selected < container->size()-1){
       ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.