9
OrestH
7y

I have waitsted whole my day searching a bug with memory allocation in C++, and still don't know how to fix it! That moment, when coding took me far less time than searching that fucking bug... I feel that i missed anything, but all looks ok
I HATE C++ WITH IT'S FUCKING POINTERS!!!!!

Comments
  • 5
    I love C++
  • 1
    So like Hintjens wrote?
    "Learning a large language like C++ is like memorizing the first thousand prime numbers. It is to fill your brain with junk without benefit."

    No smart pointers or valgrind to the rescue tho?
  • 1
    Then code in some higher level language so you dont deal with memory that much, I would never go back to C++.. Spent just too many days and nights like yours..
  • 1
    @phorkyas we (in university) are not allowed to use not basic structures, which we hadn't learned(((
    The issue is with struct dynamic allocation
  • 1
    @TrueFurby oh, dude, I wish i could)
    I learn actually Java, Python and some DevOps stuff, but in university we have to learn C++...
    In 2 years we will even learn x86 Asm
    I joke that at the end we will code with 1s and 0s only)
  • 1
    @OrestH oh right school.. Well, good luck then mate! And a lot of patience!
  • 1
  • 2
    @OrestH So no STL or the like? Well,.. sounds like stone age or plain C - just like in my first job. Had to debug some nasty memory corruption and segfaults... So I still know the pain and don't know if really teaches you anything except to hate programming.
  • 1
    @phorkyas no STL or Boost, bare C/C++, all algo and structures have to be coded by ourselves) I'd rather learn Python))
  • 4
    C++ requires a working brain.
    If brain runs below 50% use Java/.NET whatever.
    Using newer version of c++ (11,14,17) you have to put some efforts in to fuck upp.
  • 1
    @OrestH One word - Valgrind! http://valgrind.org/

    P.S. I suppose there are Windows/OSX (rough) equivalents.
  • 0
    @firusvg thanks, I'll try it later on Linux)
  • 0
    @krister-alm it needs 150% of your brain to find a bug which throws exceptions in random moment and variable, but with the same struct
  • 1
    Don't blame the language for the fact that you suck at it. Get better at it.
  • 0
    @deusprogrammer I just blame manual memory allocation in it
  • 0
    Finally found the bug... )) need to use inheritance more carefully)
  • 0
    I didnt find C++ and Data structures all to difficult honestly, its dealing with Processes/threads going out of sync that I hate with C language, and deadlocks of course
  • 1
    I suppose the easiest thing is to rewrite it in assembly... Hahahaha
  • 1
    @OrestH strange, never hade that problem with c++ (benen using it for almost 35 happt ears now).
    However, trying outfit c# and Java always gives me strange errors that I feeling, for a newer language should never be.
    Arter a day of c#/Java I always dom some c++/assembler just to clear my mind.
  • 0
    Yup, c++ is not pointless
  • 1
    @zombie01 witty said)
  • 0
    @krister-alm I used inheritance in a wrong way, have to practice more in C++)) learning ++ after Java and Python is bad idea
  • 3
    Could be worse, it could be objective-c, c++ crazy nephew that lights things on fire and has three types of booleans! Including one that uses YES and NO lol
  • 0
    @f03n1x shit, I feel safer with my 1 boolean in c++)))
  • 2
    @OrestH objective-c inherited it :/
Add Comment