C++ Banking program for beginners 💰

แชร์
ฝัง

ความคิดเห็น • 40

  • @BroCodez
    @BroCodez  2 ปีที่แล้ว +22

    #include
    #include
    void showBalance(double balance);
    double deposit();
    double withdraw(double balance);
    int main()
    {
    double balance = 0;
    int choice = 0;
    do{
    std::cout

    • @gregoryvanny-is2of
      @gregoryvanny-is2of 2 หลายเดือนก่อน

      Your video says it was made 3 minutes ago and this comment was made 1 year ago are you a time traveler?

  • @hupmitom5509
    @hupmitom5509 ปีที่แล้ว +4

    I'd love the way you give with a lot of real applications. Thanks

  • @neveroddnoreven1553
    @neveroddnoreven1553 5 หลายเดือนก่อน

    Awesome

  • @randomdude5634
    @randomdude5634 2 หลายเดือนก่อน

    coool!

  • @Draevynn95
    @Draevynn95 2 หลายเดือนก่อน

    Just had to do this for a lab in my programming class today lol. I wish I would have seen this video earlier 😭

  • @Minimunchkins90
    @Minimunchkins90 ปีที่แล้ว +9

    std::cin.clear();
    fflush(stdin);
    Isn’t stopping the loop from endlessly repeating for me when I type in a word instead of numbers

    • @reginokamberaj6
      @reginokamberaj6 ปีที่แล้ว

      yes it's the same for me :(

    • @CHAITANYAPawar-sp4zh
      @CHAITANYAPawar-sp4zh ปีที่แล้ว

      @@reginokamberaj6 did use use the using namespace std; line in your program?

    • @reginokamberaj6
      @reginokamberaj6 ปีที่แล้ว

      @@CHAITANYAPawar-sp4zh "std;line" does not make sense

    • @CHAITANYAPawar-sp4zh
      @CHAITANYAPawar-sp4zh ปีที่แล้ว

      @@reginokamberaj6 no i meant like the "using namespace std;" line

    • @kptkrunchgames
      @kptkrunchgames 10 หลายเดือนก่อน +4

      @@CHAITANYAPawar-sp4zh i triple checked every line he showed in the video, and in his discription. I also copy pasted his code from the discription into a new file to see if it works and still typing in a word breaks the program.

  • @HaroonAhmadzai-hv1dz
    @HaroonAhmadzai-hv1dz 6 หลายเดือนก่อน +1

    hello I am a student learning c++ , I have a question that why the deposit function doesn't have parameter🤔🤔🤔🤔

    • @truestprophecy
      @truestprophecy หลายเดือนก่อน

      because it doesn't call the balance variable inside of main so it doesn't need it.

  • @dortcel5550
    @dortcel5550 ปีที่แล้ว +3

    i'd like to ask... Why do we return 0
    your explanations are AWESOME and very understandable. i think if you explain it to me, this will be clear as day.

    • @Asr1elx1
      @Asr1elx1 ปีที่แล้ว

      We return 0 because condition does not true

    • @panxel8615
      @panxel8615 7 หลายเดือนก่อน

      main() is an integer function. it returns the error code which 0 means it ran fine.@@Asr1elx1

    • @virtualalphastudios6149
      @virtualalphastudios6149 2 หลายเดือนก่อน

      0=false 1=true a boolean is actually 0,1 not true and false technically

    • @SirTedric
      @SirTedric 2 หลายเดือนก่อน +1

      when you return 0, its basically stating that you have 0 errors within the code, if it comes back besides 0 then you have errors ... more than likely itll come back as 1

    • @dortcel5550
      @dortcel5550 2 หลายเดือนก่อน

      @@virtualalphastudios6149 that was not what i asked but thanks anyway

  • @Priceygames
    @Priceygames 8 หลายเดือนก่อน +1

    Why is bro not using [using namespace std;]

    • @HaoyuW
      @HaoyuW 8 หลายเดือนก่อน

      because it can cause bugs and instabilty

    • @panxel8615
      @panxel8615 7 หลายเดือนก่อน +1

      theres so much different functions and keywords that can overlap with variables. instead i like to get my main ones and make two lines. for this program i have
      using std::cout, std::cin, std::string, std::endl, std::setprecision, std::fixed, std::numeric_limits, std::streamsize;
      // Input/ Output/ String/ EndLine/ FloatPrecision/ FixedFloat/ NumericLimitations/ StreamSize/

  • @FrederikWollert
    @FrederikWollert 3 หลายเดือนก่อน

    There is a bug in this problem. When I deposit money and type for example 32.45$ than it will add that but also says Invalid Choice. Can you fix that or is it too advanced at that moment?
    I really like your C++ series. Keep it up. Please make more C++ Videos. So, let's defeat the TH-cam algorithm.

    • @l4y694
      @l4y694 3 หลายเดือนก่อน +1

      No Bro it's working fine

    • @FrederikWollert
      @FrederikWollert 3 หลายเดือนก่อน

      @@l4y694 ok. maybe I did something wrong.

    • @Lyk0ss
      @Lyk0ss 3 หลายเดือนก่อน

      If you are adding the $ yourself, that's likely what's breaking it, we just want 32.45

  • @gregoryvanny-is2of
    @gregoryvanny-is2of 2 หลายเดือนก่อน

    HOW DID YOU UPLOAD 40 VIDEOS IN HALF A HOUR? do you just release a bunch of videos every few months instead of relasing weekly uploads?

    • @virtualalphastudios6149
      @virtualalphastudios6149 2 หลายเดือนก่อน

      Normally it's easier to release a full tutorial Playlist instead of parts because people always asking about the next video or how do you do this in the comments.

  • @syedali-yh2cm
    @syedali-yh2cm 5 หลายเดือนก่อน +4

    Bros if your code gives infinte loop on character input use: std::cin.clear();
    std::cin.ignore(std::numeric_limits::max(), '
    ');

    • @maxenceveilleux
      @maxenceveilleux 3 หลายเดือนก่อน +1

      You're a legend, but just to make it even more clear for everyone, don't forget to type "#include " at the top of your file or else your code will still have errors

    • @thechudson
      @thechudson หลายเดือนก่อน

      Much thanks bro. You saved me