Giter Site home page Giter Site logo

achrafelkhnissi / cpp_modules Goto Github PK

View Code? Open in Web Editor NEW
81.0 1.0 5.0 187 KB

The goal of these modules is to introduce us to bject-Oriented Programming.This will be the starting point of our C++ journey.

Home Page: https://www.linkedin.com/in/achrafelkhnissi/

Makefile 15.99% C++ 84.01%
1337cursus 1337school 42 42born2code 42cursus 42projects 42school cpp cpp-modules cpp-modules-42

cpp_modules's Issues

Using forbidden functions?

Hey! I was checking your answers and noticed that you are using stoi, stof and stood in module 06. As explained here, those are C++11 functions.

Did you get an exception from your School or is there a loophole in the rules?

bool    Converter::isImpossible( void ) {
    try
    {
        if ( _type == INT ) {
            _n = std::stoi( _str );
        } else if ( _type == FLOAT ) {
            _f = std::stof( _str );
        } else if ( _type == DOUBLE ) {
            _d = std::stod( _str );
        }
    }
    catch ( std::exception& e )
    {
        _impossible = true;
        return true;
    }
    return false;
}

Leaks on M04 - Ex01

You forgot to delete the currrent Brain before copying it on the defintion of the copy assignment operator of cats and dogs, so when you make a copy of, let's say, a dog, using the '=' operator, you got leaks because there is a never deleted Brain.

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.