C++ Projects for beginner

I'm a beginner in C++ going through learncpp.com right now and was wondering what are some good projects too start developing. The theory is great but i want too start putting it into practice.

Nothing Ever Happens Shirt $21.68

Yakub: World's Greatest Dad Shirt $21.68

Nothing Ever Happens Shirt $21.68

  1. 3 weeks ago
    Anonymous

    Make simple raylib game, rewrite your java uni project in c++, or just frick around with socket, Idk

    • 3 weeks ago
      Anonymous

      i dont have any uni projects

    • 3 weeks ago
      Anonymous

      For my final project in programming 2 class I made a sokoban game with SFML, it was about 1000 LOC, that simple enough?

      Why would anyone use these zoomer libraries when SDL has been the tried and tested standard for like 25 years now?

      • 3 weeks ago
        Anonymous

        Raylib has decent documentation. SDL does not.

        • 3 weeks ago
          Anonymous

          All the SDL documentation you need is in headers. Learn to press f2 in your IDE.

        • 3 weeks ago
          Anonymous

          Raylibs documentation is comments in the header file.

          • 3 weeks ago
            Anonymous

            Raylib is super easy to work with . Just make pong, snake and tetris following some tutorial on youtube and then start making your own shit.

      • 3 weeks ago
        Anonymous

        Raylib has decent documentation. SDL does not.

        All the SDL documentation you need is in headers. Learn to press f2 in your IDE.

        Both of you are morons. The only true way to learn is OpenGL, the REAL tried and true solution to graphics rendering.

        chip 8 emulator is on my list looks like a really fun project

        [...]
        I would use C but i want to learn OOP programming and dont want too use java. I've asked around and heard the transition from C++ to C isnt hard, and C++ teaches me alot of programming concepts that are transferable.

        You can do OOP in C using various data structures. You can, easily, reimplement C++ features like namespaces, generics, inheritance, and polymorphism in C using structs, typedefs, and macros, alone.

        • 3 weeks ago
          Anonymous

          >SDL
          >graphic rendering
          you're beyond moronic, I'm surprised you didn't suffocate because breathing is too hard to figure out

        • 3 weeks ago
          Anonymous

          >The only true way to learn is OpenGL
          Obsolete and deprecated

        • 3 weeks ago
          Anonymous

          >OpenGL, the REAL tried and true solution to graphics rendering
          Quite ironic considering the fact that vulkan is much more versatile as a graphics api.

        • 2 weeks ago
          Anonymous

          How would you implement interfaces and namespaces in C (with nice syntax). I expect you to use const static structs for namespaces but that also seems silly.

      • 3 weeks ago
        Anonymous

        SDL is just an OpenGL initializer, while Raylib almost feels like a game engine, also, it's a really good library.

      • 3 weeks ago
        Anonymous

        Because OP is still beginner, and as beginners an instant step by step to do something and also feedback is important. Look at tutorial of sdl vs raylib which one is better at having instant feedback to keep going? Also, no one is going to stop him from using SDL once he gets better, anyway

        • 3 weeks ago
          Anonymous

          that is exactly why he should learn opengl instead, though. even if he keeps going with opengl he can continue to build whatever he wants and deploy it nearly everywhere.

          homie could even write a whole ass PS2 game, since those were written in PSGL back in the day (a PS2-unique dialect of OpenGL that has ample documentation still floating around the internet)

          The more universal the tools he learns, the less he'll have to learn in the future.

          If he learns something like SDL he'll has to abide by the limitations of the higher level library. if he wants to do something outside those limitations later he'd have to learn something new.

          or he could take the full SDL -> OpenGL -> Vulkan pipeline if that would be easier for him, i guess

          but starting with opengl is a better idea imo

      • 3 weeks ago
        Anonymous

        I was about to say this. For my compsci final I had to write a program that draws two triangles on either end of the screen. The triangles are then supposed to meet in the middle to form a bowtie. SDL was just fine and the functions just make sense.

      • 2 weeks ago
        Anonymous

        Because OP is still beginner, and as beginners an instant step by step to do something and also feedback is important. Look at tutorial of sdl vs raylib which one is better at having instant feedback to keep going? Also, no one is going to stop him from using SDL once he gets better, anyway

        I began with SDL and it worked fine for me. Tutorials are lacking buy you don't need them if you know how to read docs and header files, and how to experiment. See

        All the SDL documentation you need is in headers. Learn to press f2 in your IDE.

        I'd caution against going full face straight into OOP. Learn to program without shiny things first, to develop an understanding of when these tools are needed or not needed. Most often people will learn OOP or metaprogramming (like templates) very early and end up overcomplicating things by using them when they're not truly necessary. Even examples fall prey to this with modern C++.

        There's a big gap between practices that are taught and practices that produce quality software. 90% of learning material online is bad. Most people who produce it do so because they're not busy doing useful work. Try to be self taught as much as possible. If you're going to listen to anyone, listen to industry engineers with credentials the few times they speak up. Game engine and tooling guys (like RAD, who got bought by epic) are one example, they're autistic as hell but tend to be very no-nonsense about software.

        Most importantly, have fun

  2. 3 weeks ago
    Anonymous

    For my final project in programming 2 class I made a sokoban game with SFML, it was about 1000 LOC, that simple enough?

  3. 3 weeks ago
    Anonymous

    Try to create a multiplayer game.
    Server + clients.
    Should be terminal based and simple, so you can focus on multithreading and not on meme graphic libs.

    • 3 weeks ago
      Anonymous

      Find an old game you like, and write a clone of it from the ground up in C++. That's probably the best way to learn any language.

      thanks guys gonna attempt an uno clone with multiplayer. I dont know SFML or raylib or anything like that so just gonna make it terminal based. It'll be jank but cool.

  4. 3 weeks ago
    Anonymous

    Find an old game you like, and write a clone of it from the ground up in C++. That's probably the best way to learn any language.

  5. 3 weeks ago
    Anonymous

    Either learn C, or learn Rust or Zig, there is zero reason to use C++ at this point. It was *alright* back in the 90s, but feature creep and committee bullshit soiled it in the 2000s, and better languages have pretty much deprecated it.

    If you're hellbent on using C++, at least use C++98.

    • 3 weeks ago
      Anonymous

      While I agree `modern` C++ is terrible, you can have a sane subset by looking at Orthodox C++ or Embedded C++.

      • 3 weeks ago
        Anonymous

        Yes. Both of which are based heavily on C++98, hence why I said "If you're hellbent on using C++, at least use C++98."

        • 3 weeks ago
          Anonymous

          What's the big difference between '98 and '03? Any books you would reccomend from that era?

    • 3 weeks ago
      Anonymous

      you're a moron. he can just use smart pointers and nothing else if he wants to. he's a tard just starting out.
      >muh feature creep
      you realize you can just not use these things, right? no one is holding a gun to his head forcing him to use concepts or attributes etc.

      • 3 weeks ago
        Anonymous

        >he can just use smart pointers and nothing else if he wants to. he's a tard just starting out.
        Smart pointers are a joke, lmao. But yeah, he can -- if he can understand how they work. Most Black folk, like OP is destined to be, can't understand such a basic concept. They need guard rails like the borrow checker that will just refuse them from compiling until the program is correct.
        >you realize you can just not use these things, right? no one is holding a gun to his head forcing him to use concepts or attributes etc.
        Two things:
        1 - That is exactly why I said "If you're hellbent on using C++, at least use C++98." Learn how to read, stupid Black person.
        2 - Try explaining that to a newbie. More often than not, modern C++ newbies end up C++11maxxing and will end up doing shit like spamming the auto keyword everywhere.

    • 3 weeks ago
      Anonymous

      Rust's syntax is even worse than C++.
      And its compile times due to safety checking have an impact.

      C++ isn't as bad as you're making it out to be.

      C++ is still heavily used in gamedev, langdev, and osdev, along with general usage desktop applications for Windows. It's not nearly close to being deprecated. Stop spewing BS like a moron.

      • 3 weeks ago
        Anonymous

        >Rust's syntax is even worse than C++.
        No the frick it isnt lol. Its ugly, but its not NEARLY as ugly as C++.
        >And its compile times due to safety checking have an impact.
        Not more of an impact than unsafe code has.

        >C++ isn't as bad as you're making it out to be.
        This is pure cope when it still allows basic unsafe crap like buffer overflows to compile. Beginners don't even know what that kind of thing is, and they'll write unsafe code all over the place.

        Smart pointers, alone, don't solve the memory safety crisis. A system that checks for these things at compile time, like in Rust, does.

        >C++ is still heavily used in gamedev, langdev, and osdev, along with general usage desktop applications for Windows.
        C++ is definitely used heavily in game dev, yep.
        Lang dev? Sure, sure, even GCC is written in C++ these days.

        OS dev and general purpose programs? LMAO.

        OS and embedded dev HAS YET TO STOP being dominated by C, and most of the newbies getting into systems dev these days are getting into neither C or C++, but they're getting into Rust.

        and general purpose programs are usually written in your Javas or C#s these days, and it's been like this since the mid-2000s.

        C++ is deprecated for everything outside of game development.

        C++ will inevitably be deprecated for game development too, given the steam that Rust game development is picking up with.

        Well-written FFIs make using Rust in-place of C or C++, safely, a piece of fricking cake.

        Anti-Rust is the biggest cope.

        • 3 weeks ago
          Anonymous

          >No the frick it isn't lol. It's ugly but not NEARLY as ugly as C++

          Okay, show me specifically what's ugly about C++. You have :: for scope resolution, you have -> for pointers, . for member selection, <> for template arguments. Tell me exactly what is so difficult or ugly about the syntax.

          >And its compile times due to safety checking have an impact.
          Not more of an impact than unsafe code has
          You do know C++ implements RAII in C++14, right? Besides, if you're unable to use smart pointers, any modern environment is able to check for memory leaks.

          >This is pure cope
          Ironic. Personally I think you're fricking stupid and coping with your troonylang.

          >OS and embedded dev HAS YET TO STOP being dominated by C
          I never said it's dominated by C, I'm saying it's used quite often in those fields. A lot more than Rust and Zig.

          >Anti-Rust is the biggest cope.
          >"Men cannot get pregnant"
          "You have been banned from the Rust Discord, Forums, and GitHub Projects. You are no longer able to create PRs against any repository in the Rust Organization... "

          You're the one coping. I'd like to remind you that you were the one who brought up rust, trying to get anyone you can to try and support your ugly gay ass language.

          • 3 weeks ago
            Anonymous

            >Okay, show me specifically what's ugly about C++. You have :: for scope resolution, you have -> for pointers, . for member selection, <> for template arguments. Tell me exactly what is so difficult or ugly about the syntax.
            It's not difficult at all, just ass ugly and a headache to sight-read. Pic fricking related.
            >You do know C++ implements RAII in C++14, right?
            Which still requires some explicit ownership transfer in circumstances, is still obtuse with managing dynamic resources, AND requires the data to be wrapped in a class, uselessly.

            The borrow checker just always is unless you pass unsafe {}, which you only do when youre doing something small and specific, usually only at the machine level.
            >le troony memes
            The best way to tell when a Cnile or a Sepplesgay has hit the wall with their arguments is when they reach for the troony memes.

          • 3 weeks ago
            Anonymous

            >using "new Resource()" instead of
            auto resource { std::make_unique<Resource>()}

            Thank you for confirming that you don't know shit about C++ moron.

            >The best way to tell when a Cnile or a Sepplesgay has hit the wall with their arguments is when they reach for the troony memes

            You have no idea how hypocritical that sounds when you start trying to cope with "muh safety" memes

          • 3 weeks ago
            Anonymous

            Good job shifting the goalposts, moron.

            >"c++ is bloated, ugly, and suffers from feature creep. there are 10 different ways to do any given task, and they keep adding new ones with every standard update."
            >"here is a C++ feature I dislike"

            >"just use this ugly new bullshit feature creep introduced in the last decade, duh!!!"

            You are a WALKING meme, bro. That is the exact problem with C++. It introduces problems with each standard and instead of fixing them in the next standard they just deprecate old features for new ones without actually removing those old features from the standard. By 2040, there will be 126 different ways to use a return statement in C++, lol.

            This is just one example of what im talking about right here ^

            also,
            >auto resource { std::::::::::::::::cum_Black person_fart<ShitCum>()}
            THIS IS WHY C++ IS UGLY. That syntax sugar is just straight fricking AIDS to look at when it starts to pile up in large projects.

            >You have no idea how hypocritical that sounds when you start trying to cope with "muh safety" memes
            Memory and type safety aren't memes, moron. Not that a Sepplesgay would understand that.

          • 3 weeks ago
            Anonymous

            >good job shifting goalposts
            I'm not shifting the goalpost. I'm stating you don't know what you're talking about which qualifies as a rational rebuttal since you're arguing in favor of one thing (Rust) over the other (C++).

            >THIS IS WHY C++ IS UGLY. That syntax sugar is just straight fricking AIDS to look at when it starts to pile up in large projects.
            It's your fault that you're unable to follow namespace resolution. Skill issue.

            You are straight fricking moronic.

          • 3 weeks ago
            Anonymous

            >I'm not shifting the goalpost. I'm stating you don't know what you're talking about which qualifies as a rational rebuttal since you're arguing in favor of one thing (Rust) over the other (C++).
            No, shifting the goalposts is exactly what you did. Instead of acknowledging my screenshot in full and admitting how much simpler the code on the left is, you deflected with "B-B-BUT C++ HAS HAD [x feature] SINCE C++11!!!!!!!!!!!!!"

            And you used this deflection DESPITE the fact that I already argued that this exact kind of behavior from C++ is trash.

            >"It's stupid that C++ keeps introducing new features and design elements instead of fixing its original features and design."
            >"ERR! BUT WE HAVE THIS NEW FEATURE, moron!!! GOOD JOB ADMITTING YOU DONT KNOW WHAT YOURE TALKING ABOUT!"
            Yeah, thats the fricking problem. Feature creep and self-deprecation is the EXACT problem with modern C++.
            >It's your fault that you're unable to follow namespace resolution. Skill issue.
            I never said it was hard. I specifically said it wasn't hard. I said it was ugly, and a headache.

            It isn't hard to follow colons and arrows, but that doesn't mean colons and arrows are any less of an ugly symbol to be plastered all over your screen a million fricking times.

            Its not HARD to read. C++ being hard is a meme. People who think C++ are hard are peak dunning kruger. Its that its fricking annoying to read.

          • 3 weeks ago
            Anonymous

            I'm not saying C++ is perfect either. There are plenty of examples of C++ being incredibly ugly, I was merely asking for an example.
            I disagreed with your initial example, but I wouldn've agreed with you if you made an example of something such as SFINAE.
            template <typename T, typename... Ts,
            typename = std::enable_if_t<
            std::conjunction_v<
            std::is_same<
            std::remove_cv_t<T>, std::remove_cv_t<Ts>>...>>>

            C++ also has a conundrum with value categories. You have prvalues and xvalues which are a category of rvalues, but an xvalue can also be a glvalue along with lvalues.
            As Bjarne said "Within C++, there is a much smaller and cleaner language struggling to get out"

          • 3 weeks ago
            Anonymous

            C-Style C++ is actually a very elegant language. I think that C-Style C++ is the smaller and cleaner language Bjarne is referring to. I don't understand how C++ got to the point it is at though.
            Bjarne had a REALLY FRICKIN SIMPLE TASK, make C with Classes. But he screwed the pooch like a moron.

            the majority of industry c++ codebases are c++03 or before. good luck using your modern c++ skills to get a job, Black person, because c++11 and c++20 jobs dont exist. at any job, youll be looking at code like this [...].
            >inb4 'i dont program as a career'
            i can tell.
            [...]
            rust really isnt any better when it comes verbosity, ugliness and feature creep though. quit coping. rust is just c++ part 2. both languages suck homosexual ass.
            rust has zero jobs, please leave your mom's basement.
            [...]
            the only reason you disagreed with his example is because of a modern c++ feature you used to replace it. and as i said above, these modern c++ features are only used by c++ hobbyists, modern c++ is seldom deployed in any professional context. "your example is bad because of this new language feature" is a bad argument when only hobbyists use said language feature still.
            >As Bjarne said "Within C++, there is a much smaller and cleaner language struggling to get out"
            uh-huh, and its called C

            You've never had sex before.

          • 3 weeks ago
            Anonymous

            since everyone defines it differently, and its usually an unholy monstrosity regardless, let's see how you define "C-Style C++".

          • 3 weeks ago
            Anonymous

            >plenty of examples
            >didn't post the rest of the code because he just made up this badly formatted meme on the spot

          • 2 weeks ago
            Anonymous

            in C++20 this is just
            template <typename T, typename... Ts>
            requires (std::same_as<std::remove_cv_t<T>, std::remove_cv_t<Ts>> && ...)

          • 3 weeks ago
            Anonymous

            the majority of industry c++ codebases are c++03 or before. good luck using your modern c++ skills to get a job, Black person, because c++11 and c++20 jobs dont exist. at any job, youll be looking at code like this

            >Okay, show me specifically what's ugly about C++. You have :: for scope resolution, you have -> for pointers, . for member selection, <> for template arguments. Tell me exactly what is so difficult or ugly about the syntax.
            It's not difficult at all, just ass ugly and a headache to sight-read. Pic fricking related.
            >You do know C++ implements RAII in C++14, right?
            Which still requires some explicit ownership transfer in circumstances, is still obtuse with managing dynamic resources, AND requires the data to be wrapped in a class, uselessly.

            The borrow checker just always is unless you pass unsafe {}, which you only do when youre doing something small and specific, usually only at the machine level.
            >le troony memes
            The best way to tell when a Cnile or a Sepplesgay has hit the wall with their arguments is when they reach for the troony memes.

            .
            >inb4 'i dont program as a career'
            i can tell.

            >I'm not shifting the goalpost. I'm stating you don't know what you're talking about which qualifies as a rational rebuttal since you're arguing in favor of one thing (Rust) over the other (C++).
            No, shifting the goalposts is exactly what you did. Instead of acknowledging my screenshot in full and admitting how much simpler the code on the left is, you deflected with "B-B-BUT C++ HAS HAD [x feature] SINCE C++11!!!!!!!!!!!!!"

            And you used this deflection DESPITE the fact that I already argued that this exact kind of behavior from C++ is trash.

            >"It's stupid that C++ keeps introducing new features and design elements instead of fixing its original features and design."
            >"ERR! BUT WE HAVE THIS NEW FEATURE, moron!!! GOOD JOB ADMITTING YOU DONT KNOW WHAT YOURE TALKING ABOUT!"
            Yeah, thats the fricking problem. Feature creep and self-deprecation is the EXACT problem with modern C++.
            >It's your fault that you're unable to follow namespace resolution. Skill issue.
            I never said it was hard. I specifically said it wasn't hard. I said it was ugly, and a headache.

            It isn't hard to follow colons and arrows, but that doesn't mean colons and arrows are any less of an ugly symbol to be plastered all over your screen a million fricking times.

            Its not HARD to read. C++ being hard is a meme. People who think C++ are hard are peak dunning kruger. Its that its fricking annoying to read.

            rust really isnt any better when it comes verbosity, ugliness and feature creep though. quit coping. rust is just c++ part 2. both languages suck homosexual ass.
            rust has zero jobs, please leave your mom's basement.

            I'm not saying C++ is perfect either. There are plenty of examples of C++ being incredibly ugly, I was merely asking for an example.
            I disagreed with your initial example, but I wouldn've agreed with you if you made an example of something such as SFINAE.
            template <typename T, typename... Ts,
            typename = std::enable_if_t<
            std::conjunction_v<
            std::is_same<
            std::remove_cv_t<T>, std::remove_cv_t<Ts>>...>>>

            C++ also has a conundrum with value categories. You have prvalues and xvalues which are a category of rvalues, but an xvalue can also be a glvalue along with lvalues.
            As Bjarne said "Within C++, there is a much smaller and cleaner language struggling to get out"

            the only reason you disagreed with his example is because of a modern c++ feature you used to replace it. and as i said above, these modern c++ features are only used by c++ hobbyists, modern c++ is seldom deployed in any professional context. "your example is bad because of this new language feature" is a bad argument when only hobbyists use said language feature still.
            >As Bjarne said "Within C++, there is a much smaller and cleaner language struggling to get out"
            uh-huh, and its called C

          • 3 weeks ago
            Anonymous

            >the majority of industry C++ codebases are C++03 or before

            Show me evidence of this.

          • 3 weeks ago
            Anonymous

            His statement is really only true of the embedded industry, don't listen to him.

          • 3 weeks ago
            Anonymous

            Yeah that would make sense.
            Apparently C++17 is the most common standard in enterprise codebases at the time this article was published January of this year.

          • 3 weeks ago
            Anonymous

            Forgot to paste article
            https://blog.jetbrains.com/clion/2024/01/the-cpp-ecosystem-in-2023/

        • 3 weeks ago
          Anonymous

          >OS and embedded dev HAS YET TO STOP being dominated by C, and most of the newbies getting into systems dev these days are getting into neither C or C++, but they're getting into Rust.
          who gives a frick about what newbie CS students are doing when all employers on earth ask for C and C++?
          >C++ will inevitably be deprecated for game development too, given the steam that Rust game development is picking up with.
          there are 50 Rust game engines, half of which are abandoned, and 2 shitty games. No one cares about Rust in the gamedev world, and many who tried regretted it. Even if all devs agreed that Rust is a better fit (they don't) they'd still need decades to catch up with the existing C++ ecosystem. Every single popular game engine from Godot to Unreal is written in C++, not to mention in-house engines

    • 3 weeks ago
      Anonymous

      it's literally THE language in aerospace, cars, robotics, defense, simulations, telecom, parts of embedded, video games and even AI infrastructure

      Rust is only used by top tier devs at FAANG, junior devs rarely if ever get the chance to use it
      who the frick uses Zig besides neets and the Bun guy?

      • 3 weeks ago
        Anonymous

        >not aiming to be a top dev tier at FAANG
        ngmi

        • 3 weeks ago
          Anonymous

          if you're *aiming* to be a top tier dev at FAANG instead of already being one, you're ngmi by wasting your time on memelangs. C++ is still one of the most widely used languages in the big corps, and you're much more likely to land a C++ role at entry level than a Rust role. For actually realistic chances you should really be learning Java and Python though. I hate Python but it's the truth

  6. 3 weeks ago
    Anonymous

    1 - chip-8 emulator
    2 - opengl renderer
    3 - basic Raspberry Pi kernel, use it to make the board light blink

    • 3 weeks ago
      Anonymous

      chip 8 emulator is on my list looks like a really fun project

      Either learn C, or learn Rust or Zig, there is zero reason to use C++ at this point. It was *alright* back in the 90s, but feature creep and committee bullshit soiled it in the 2000s, and better languages have pretty much deprecated it.

      If you're hellbent on using C++, at least use C++98.

      I would use C but i want to learn OOP programming and dont want too use java. I've asked around and heard the transition from C++ to C isnt hard, and C++ teaches me alot of programming concepts that are transferable.

      • 3 weeks ago
        Anonymous

        [...]
        [...]
        Both of you are morons. The only true way to learn is OpenGL, the REAL tried and true solution to graphics rendering.
        [...]
        You can do OOP in C using various data structures. You can, easily, reimplement C++ features like namespaces, generics, inheritance, and polymorphism in C using structs, typedefs, and macros, alone.

        Furthermore, the only real benefit C++ provides you over C is the convenience of having such data structures implemented in the standard library already. but at the end of the day, C++ was originally written in C; this is all you need to know to know that you can manually reimplement C++ features in C.

        One of your first projects could be just that, writing your own C library for C++ features, a library you can reuse for every project going forward.

        The number of C++ features you use probably doesn't exceed 7 or 8, I guarantee you don't touch the other 1,000,000 features. Just reimplement the 7 or 8 you want.

        • 3 weeks ago
          Anonymous

          but what are the benefits of C over C++?

          • 3 weeks ago
            Anonymous

            C = C+1

          • 3 weeks ago
            Anonymous

            Lower abstraction, quicker deployment, better readability, etc. Better portability used to be a big benefit over C++ in the 90s but all C++ compilers have thankfully caught up to C by now when it comes to this.

            And honestly, the biggest benefit of C is the lack of C++-induced headaches.

            >SDL
            >graphic rendering
            you're beyond moronic, I'm surprised you didn't suffocate because breathing is too hard to figure out

            How the frick do you think you write games, b***h? You render graphics. SDL automates this process and just provides library functions to start building games with; this is lazy shit for chumps. Real game developers render their game's graphics from scratch.

          • 3 weeks ago
            Anonymous

            >REAL x do y
            actual toddler

          • 3 weeks ago
            Anonymous

            >opengl (yes opengl lmao) is the only true way to do graphics programming
            you are a lost cause lmao

          • 3 weeks ago
            Anonymous

            Considering the only commonly used computer systems that don't have a native OpenGL implementation OOTB in the last 25 years are Microsoft Xboxes, and the PS5, I would say that YOU are the lost cause if you don't learn OpenGL.
            OpenGL is one of those programming fundamentals, like C itself, that you are actively kneecapping yourself by not learning.

            >The only true way to learn is OpenGL
            Obsolete and deprecated

            This is the case with all tried and true softwares. There isn't a single stable software that isn't in a "finished" state, or deprecated. This is what makes it tried and true: being unchanging, stable, having long term support versions, and being massively adopted for over 2 decades now.

            >OpenGL, the REAL tried and true solution to graphics rendering
            Quite ironic considering the fact that vulkan is much more versatile as a graphics api.

            I never said versatile. I said tried and true. Vulkan is WAY too new to be considered tried and true.

            >How the frick do you think you write games, b***h?
            DirectX, meaning Win32, DXGI, D3D, D2D, Dwrite, DInput/Xinput, DirectMedia/DirectShow/MS Media Foundation, DirectSound/XAudio. Keep seething with your SDL shit.

            >DirectX
            Sure, if you're a worthless homosexual Wincuck, lmao. Even Windows has OpenGL, though; and now Vulkan, which is better than DirectX in every way. Get lost, proprietard.

            i thought endl was just short for 'n' and flush the stream. How would endl make it cross platform?

            Different OSes handle newlines differently. Unix uses a standard newline return, "n", whereas Windows uses a carriage newline return, "rn". std::endl; automatically uses the return necessary for the OS you are compiling for.

            this can be replicated in C using ifdef really easily, though, so you dont need std::endl for it.

            #ifdef _WIN32
            #define ENDL "rn"
            #else
            #define ENDL "n"
            #endif

          • 3 weeks ago
            Anonymous

            >Sure, if you're a worthless homosexual Wincuck, lmao. Even Windows has OpenGL, though; and now Vulkan, which is better than DirectX in every way. Get lost, proprietard.
            DirectX doesn't equal OpenGL and Vulkan fricking brainlet freetard, only part those correspond to is D3D.
            Also reason why D3D rendering is slower than opengl/ vulkan is because DirectX standard is stricter, OpenGL is full of shit where different vendor implementations render same shader + data differently that changes between driver versions and gpus, specially when you venture to less used side of tesselation / geometry shaders. So its tested and true shit. Where as with D3D11/12, you can be fricking sure that it is rendered as it should been no matter what green/red/blue potato is drawing it as long it has enough features, mainly difference is in performance, but that is vendor driver problem, not windows problem. Vulkan is alright, but contains lot of useless extra on windows as it contains everything for all platforms, so working with D3D12/12_2 is lot less noise.

          • 3 weeks ago
            Anonymous

            >DirectX doesn't equal OpenGL and Vulkan fricking brainlet freetard
            DirectInput, DirectDraw, and Direct3D are OpenGL + GLFW. OpenAL instead of DirectSound. FFmpeg for DirectShow. Any networking library of your choosing instead of DirectPlay.

            Idiot.

            >Also reason why D3D rendering is slower than opengl/ vulkan is because DirectX standard is stricter, OpenGL is full of shit where different vendor implementations render same shader + data differently that changes between driver versions and gpus, specially when you venture to less used side of tesselation / geometry shaders.
            This is why you're supposed to write a fricking API to handle these differences for you on the fly, you baby coder.
            >So its tested and true shit.
            It's a tested and true universal library.
            >Where as with D3D11/12, you can be fricking sure that it is rendered as it should been no matter what green/red/blue potato is drawing it as long it has enough features, mainly difference is in performance, but that is vendor driver problem, not windows problem.
            Yep, that's because DirectX only runs on Windows and Xboxes, because it is a dumbass walled garden.
            That is like defending how well macOS works on Macbooks, as if that isnt purely due to the fact that it ONLY runs on Macbooks and has less porting to worry about.

            Even if DirectX were as universal as the Khronos tools, it would still perform worse.

            >Vulkan is alright, but contains lot of useless extra on windows as it contains everything for all platforms, so working with D3D12/12_2 is lot less noise.
            You're an actual moronic Winhomosexual babycoder if you think features added for portability is "less noise."

            Enjoy your Microsoft walled garden, proprietard. You'll never be a real until you learn TRUE tried and tested tools.

            UNIX, C, OpenGL (or drawing directly to framebuffer if youre a greybeard weirdo who wants a real challenge), Vi, etc. Decades-old tools that almost every universally loved programmer has used in the past.

          • 3 weeks ago
            Anonymous

            Keep screeching, not my fault that walled garden offers robust development environment. Also drawing directly to framebuffer isn't challenge, it's stupid( on any device that no longer has hardware 2D acceleration features). Also as linux is middle of its X11/wayland shitshow, it's even more joke now until that is resolved. So basically gamedev wants stability as projects easily span years and its fricking annoying to constantly update packages to maybe fix some quirks and receive more annoyances (with windows i maybe install updates once or twice a year and not single time has my dev setup broken). Meanwhile my btw arch friends constantly tweak their shit or cry as it breaks instead of actually working on projects and yes, it needs be arch for them as they need sometimes hottest rolling shit.

            >Keep using caveman tools as many cavemen before used them.
            Staying with VS + MSVC/Clang thank you very much and if i need to do pingu / posix stuff, i have WSL for that and still can use VS making them.

          • 3 weeks ago
            Anonymous

            >How the frick do you think you write games, b***h?
            DirectX, meaning Win32, DXGI, D3D, D2D, Dwrite, DInput/Xinput, DirectMedia/DirectShow/MS Media Foundation, DirectSound/XAudio. Keep seething with your SDL shit.

          • 3 weeks ago
            Anonymous

            please read homosexuals post again. SDL is only for starters.

          • 3 weeks ago
            Anonymous

            wouldn't even use that for starters, making window is basics of basics so it doesn't need to be hidden, making simple DX11 device is straight forward and then bolting D2D over it is also easy, so getting to draw 2D shit with D2D is fricking elementary level. After fricking around enough and getting comfortable with C++, then next step is D3D with DX11 and after you have fricked around enough and ran to limits what DX11 can do, then its time to go to DX12. But as said, D2D is piss easy and is beginner level stuff.

          • 3 weeks ago
            Anonymous

            You can learn 80% of what you need in a week and then read real code and understand it.

          • 3 weeks ago
            Anonymous

            where would you point someone at to start?

          • 3 weeks ago
            Anonymous

            He is talking shit. C is hard because there is a million ways to skin a cat and everyone swears blind their pet way is the best and if you do it any other way you're the antichrist. Go into any C thread and ask how to take a string of a unknown length from the user and enjoy the shit show that will follow. C++ has its pit falls, years of legacy cruft and bullshit that should have never been in the language but it has idiomatic ways of doing things which makes learning a lot easier as you aren't spending hours trying to find a good way to do X thing every time you want to learn something new.

          • 3 weeks ago
            Anonymous

            >C is hard because there is a million ways to skin a cat and everyone swears blind their pet way is the best and if you do it any other way you're the antichrist. Go into any C thread and ask how to take a string of a unknown length from the user and enjoy the shit show that will follow. C++ has its pit falls, years of legacy cruft and bullshit that should have never been in the language but it has idiomatic ways of doing things which makes learning a lot easier as you aren't spending hours trying to find a good way to do X thing every time you want to learn something new.

            You have this LITERALLY BACKWARDS.

            C puritans usually have their standard way of doing things.

            uint_8 set to 1 or 0 instead of booleans
            char* instead of strings
            structs with function pointers, typedefs, macros, etc. instead of namespaces, enums, and classes
            bitcrushing
            etc.

            meanwhile, in C++, you can deduct the type of a variable with: decltype, auto, and template type inference. you can achieve anonymous functions with both lambdas AND function pointers, for some reason.

            both const and constexpr can be used to define constants; const is used for values that are known at runtime but cannot change after initialization, while constexpr is used for values that can be computed at compile-time. they overlap in scenarios where the value is known at compile-time.

            Even iterators, you can use for loops, while loops, range-based loops, std::for_each, etc.

            Too many god damn redundant features.

          • 3 weeks ago
            Anonymous

            >Go into any C thread and ask how to take a string of a unknown length from the user and enjoy the shit show that will follow
            I just use fgets if you mean something like that, or a buffer if you mean reading piecewise from a file.
            At some point, there will be some upper limit on what the user can input. Paths can't be longer than some number of characters (I forgot), memory only holds so much information, etc etc

          • 3 weeks ago
            Anonymous

            >Go into any C thread and ask how to take a string of a unknown length from the user

            It may be unknown but there is a max. Memory is not infinite. There is a limit to how much space there can be allocated. The best solution is to just set a maximum amount.

            If we want to parse X number of books of Y length for the number of occurrences of Z word it seems like you guys are hinting at reading into char [INT_MAX] and hope it doesn't overflow.

          • 3 weeks ago
            Anonymous

            Depending on the project I either use a dynamic array with malloc and realloc, or I just use a large standard buffer

          • 3 weeks ago
            Anonymous

            >Go into any C thread and ask how to take a string of a unknown length from the user

            It may be unknown but there is a max. Memory is not infinite. There is a limit to how much space there can be allocated. The best solution is to just set a maximum amount.

          • 3 weeks ago
            Anonymous

            >Go into any C thread and ask how to take a string of a unknown length from the user and enjoy the shit show that will follow
            I just use fgets if you mean something like that, or a buffer if you mean reading piecewise from a file.
            At some point, there will be some upper limit on what the user can input. Paths can't be longer than some number of characters (I forgot), memory only holds so much information, etc etc

            >Go into any C thread and ask how to take a string of a unknown length from the user

            It may be unknown but there is a max. Memory is not infinite. There is a limit to how much space there can be allocated. The best solution is to just set a maximum amount.

            [...]
            If we want to parse X number of books of Y length for the number of occurrences of Z word it seems like you guys are hinting at reading into char [INT_MAX] and hope it doesn't overflow.

            This is where writing your own function comes in, which is C standard among professionals.
            #include <stdio.h>
            #include <stdlib.h>

            #ifdef _WIN32
            #define ENDL "rn"
            #else
            #define ENDL "n"
            #endif

            char *getInputString(void)
            {
            size_t initial_bufsize = [whatever size you want];
            char *buffer = (char *)malloc(initial_bufsize * sizeof(char));

            if (buffer == NULL)
            {
            fprintf(stderr, "Memory allocation failed.%s", ENDL);
            exit(EXIT_FAILURE);
            }

            fprintf(stdout, "Enter a string (press Enter when done):%s", ENDL);

            int c;
            size_t i = 0;

            while ((c = getchar()) != 'n' && c != EOF)
            {
            buffer[i++] = (char)c;

            if (i == initial_bufsize - 1)
            {
            initial_bufsize *= 2;
            char *tmp = (char *)realloc(buffer, initial_bufsize * sizeof(char));

            if (tmp == NULL) {
            fprintf(stderr, "Memory allocation failed%s", ENDL);
            free(buffer);
            exit(EXIT_FAILURE);
            }

            buffer = tmp;
            }
            }

            buffer[i] = '';

            return buffer;
            }

            int main()
            {
            char *inputString = getInputString();

            fprintf(stdout, "You entered: %s%s", inputString, ENDL);

            free(inputString);
            return 0;
            }

            you can now package getStringInput() into a .h and .c file to preprocess for future use, whenever.

            The function I wrote here is pretty much the standard C protocol for this kind of thing.

            I have seen identical functions to this in every major C codebase i have worked on.

            there ARE standard C protocols for these kinds of things.

            C++, on the other hand, has 10 different redundant built in protocols for every feature.

          • 3 weeks ago
            Anonymous

            que the incoming c friends telling you never to use malloc

          • 3 weeks ago
            Anonymous

            malloc() is fine, and more efficient, when you wrap it in a safe code function, like how I wrapped string input in safe code.

            basically, take all your unsafe code, and wrap it in extreme amounts of edgecase and error handling.

          • 3 weeks ago
            Anonymous

            Aaah! So thats why newlines in Windows are all fricky! They have two scape sequence codes for a newline? If so thats moronic.

          • 3 weeks ago
            Anonymous

            its kinda shitshow currently, basically anything older from some point x need rn, but new stuff like terminal work with only having n now. But basically for a while now i haven't had problems doing only n newlines in my CLI projects(C++/C#). Enter returns rn still at least what i have observed and tested.

          • 3 weeks ago
            Anonymous

            >currently
            windows was always garbage, if you know, you know

          • 3 weeks ago
            Anonymous

            https://www.amazon.com/Effective-Introduction-Professional-Robert-Seacord/dp/1718501048

          • 3 weeks ago
            Anonymous

            >https://www.amazon.com/Effective-Introduction-Professional-Robert-Seacord/dp/1718501048

            https://annas-archive.org/search?q=Effective+C%3A+An+Introduction+to+Professional+C+Programming

          • 3 weeks ago
            Anonymous

            The main benefit of C over C++ is that the language is much smaller, with mostly a lot less complexity.
            Yes, that means that there are quite a few things that it doesn't do for you, but it also means that you don't have to work around anything like so many pitfalls in the language. This means that C code tends to be more readable than C++, at least unless someone's decided to get smartass with macros, and I'm guilty as charged there.

  7. 3 weeks ago
    Anonymous

    Turn the string, s = "hello world; my name is Anon" into "Hello World".

    In Python, it's simply
    s.split(';')[0].title()

    • 3 weeks ago
      Anonymous

      What's the time complexity of your code? Bonus question: how many memory allocations did your program perform?

      • 3 weeks ago
        Anonymous

        O(n)
        Multiple

      • 3 weeks ago
        Anonymous

        Why the frick do you give 2 shit about any of these for such a simple string operation? It will take near enough the same amount of time in any language.

        • 3 weeks ago
          Anonymous

          he wants to use phrases to move them to his working memory

  8. 3 weeks ago
    Anonymous

    std::cout << "Hello World" << std::endl;
    Now draw the rest of the fricking owl, homosexual

    • 3 weeks ago
      Anonymous

      why are you so mean

      also shouldnt you use 'n' instead of endl as its faster

      • 3 weeks ago
        Anonymous

        you obviously don't know what cross-platform means

        • 3 weeks ago
          Anonymous

          i thought endl was just short for 'n' and flush the stream. How would endl make it cross platform?

          • 3 weeks ago
            Anonymous

            frick you for asking, there is a difference between n, rn and r

  9. 3 weeks ago
    Anonymous

    learn jai

    • 3 weeks ago
      Anonymous

      no

  10. 3 weeks ago
    Anonymous

    Write a part of your own STL. Implement things like std::string and std::vector yourself. Shows you know how your language works and that you're competent with it.

  11. 3 weeks ago
    Anonymous

    get qtcreator and make a calculator and a tetris game

  12. 3 weeks ago
    Anonymous

    make a programmable turtle. your simple, command-line tool will move the '#' character around the screen. it will take arguments for width and height, as well as --wrap or --no-wrap to handle the edge and corner cases (hah! get it?). you can either pipe into stdin, use an option like --input to read from a file, or use an option like --interactice and it will give you a CLI. don't forget to implement a help command and --color option. start with a turtle that moves up, down, right, and left. once you have that down add color, handle edge cases, and add the options. shouldn't be too hard if you break it down into pieces

  13. 3 weeks ago
    Anonymous

    Write a program that takes every word of the input and makes sure it starts with an uppercase letter. What's the matter, rookie, too hard for you?

  14. 3 weeks ago
    Anonymous

    But if OP is still reading this shit show and has still read it all, my advice is that simply decide to do something simple for example from pic related and then try mainly search only information of what the thing you are making is and what it does (if you select something you don't fully know what it is) and don't search any "how to" stuff and try to only deal with figuring out small steps you need to do, while reading reference, for example from cppreference.com, so main point is not only to learn C++, but also train your brain to figure out solutions instead of searching ready made answers. Also for clarity, stay away from smart pointers and auto at first as those turn code into slow readable swamp more often than not.

    • 3 weeks ago
      Anonymous

      Thanks other than the schizos this thread has given me a ton of project ideas. I'm going too continue learning c++ but i will take a look at c as it does look interesting.

  15. 3 weeks ago
    Anonymous

    Buy a Raspberry Pi and use it to code a robot that sucks my dick

  16. 3 weeks ago
    Anonymous

    plenty of good ideas in this thread but I'll also propose : writing a roguelike and writing a point & click.
    2 projects that are fun, don't take too long (important to ask for feedback) and that you can share with others

  17. 2 weeks ago
    Anonymous

    I did a couple of courses recently and a shit load of small projects

    - recipe manager (cli application to manage dishes and ingredients, store shit in simple text/json file)
    - CLI calculator (parse and evaluate math expressions)
    - game of life
    - battleship
    - quiz manager (http API to manage quizzes, users can then solve them)
    - cli phone book (manage contacts, i.e., persons and companies, store db in a text file)
    - poor mans git (simple VCS where you can stage, commit and restore files from a certain working directory).
    - tic tac toe with simple (and unbeatable, via back tracking) ai player
    - simple json database (client & server, client sends crud commands over a socket, server maintains json database, i.e. big json file)

    I personally liked the calculator and the client/server db. I don't know if this helps without more details, but If you just needs suggestions what to do, you can figure out some requirements for these kind of training projects on your own, I guess.

    I haven't done any c++ courses, though. The projects above were all "hard" or "challenging" since I program for many years but wanted to try new languages. Everything was just CLI and http API.

Your email address will not be published. Required fields are marked *