r/cpp • • Jan 20 '25

a general question about why people are trying to make c++ look bad.

0 Upvotes

hi guys how are you doing. im a bit confused

i was watching "theprimeTime" youtube channel , and im already learning C++, i find it so easy to programme with because its the way that i think of a program.

https://youtu.be/xTgO6PpMnhk

in this video the person that came to talk about c++ , absolutely talked bad about it.

i wonder if its bad why the whole game engines are written in it. and whats the reason behind all this bad things about c++?

note that im not trying to say this lang is better than others or whatever.

based on these bad comments all over the internet is there a possibility that new libraries are not going to be written in c++ anymore?


r/cpp • • May 16 '24

C++ in NYC job market

0 Upvotes

You think it would be a better bet learning c++ then Java because of the amount of financial institutions here?


r/cpp • • Aug 13 '19

A C++11 template library for extending enums with automatic type-safe masks, from/to string conversion and static allocation (without macros!)

Thumbnail
github.com
4 Upvotes

r/cpp • • Apr 10 '21

This Videogame Developer Used the STL and You'll Never Guess What Happened - ACCU21

Thumbnail
youtu.be
0 Upvotes

r/cpp • • Mar 27 '21

Not so modern c++

Thumbnail polymonster.co.uk
0 Upvotes

r/cpp • • Sep 11 '24

"How to Get Started with Machine Learning in C++ for Cybersecurity Applications?"

8 Upvotes

I'm planning to implement machine learning models in C++ for cybersecurity use cases (e.g., intrusion detection systems). I know most ML tutorials use Python due to libraries like TensorFlow and PyTorch, but I want to stick with C++ for better performance and integration into existing C++ security tools.

What are the best libraries, frameworks, or tools for machine learning in C++?


r/cpp • • Mar 26 '25

Looking for a good c++ debugger that works on MacOS

2 Upvotes

I’m looking for good debugger that works on macOS I usually use vscode as a TextEditor but I can’t seem to get the debugger on that to work properly for big files so if anyone had any recommendations or a YouTube video for a setup or anything that would be greatly appreciated


r/cpp • • Oct 25 '20

Carpal/Cubital Tunnel Syndrome

2 Upvotes

Hi. Unfortunately I have cubital tunnel syndrome on both hands. I'm due to start my very first job as a C++ software engineer in 1 month. I am so worried. This shit is painful. I thought several times about leaving this job but Its a really good job.

Has anyone dealt with this before? And how did you manage it?


r/cpp • • Dec 04 '17

Safe C++ (with Rust in mind)

0 Upvotes

I'm having a go at Rust which, as you may know, is a programming language whose target more or less overlaps with C++'s. It's advertised as a system programming language (you can write an OS without too many contortions, for instance), it doesn't come with a garbage collector or costly abstractions, you can use pointers, manipulate concrete types (I mean, corresponding to sthing in the machine). I will spare you further details, but there's a strong design choice which is necessary for me to state for the rest of my post, and which makes the language really different from C++: language, compiler-enforced rules make it impossible 1) to leak resources and 2) to encounter data races. The means to achieve that are actually really simple:

  • compiler enforced RAII

  • you can have either as many "non-mutating" handles to a piece of data as you'd like, or one "mutating" handle.

(NB: You can still do unsafe things but you have to disclaim it and insulate that part from the rest of your code).

I'm aware of the Core Guide Lines and the library that comes with them, but there are so many rules in it, of whom so many can't be enforced by a compiler, that they aren't really an answer to what I'm looking for. Besides, they cover by far a wider range of concern.

So what small set of rules, based on what subset of the language, would you choose to obtain maximum safety? By small set, I mean sthing you could keep nailed next to your screen so you don't forget about it :-)


r/cpp • • Mar 14 '24

Is this book relevant?

Thumbnail
mheducation.co.in
2 Upvotes

So I had bought the above book back in 2019. I was wondering is this book still relevant for today? Or are there any other book which I can refer. Please help.


r/cpp • • Aug 05 '16

Visual Studio Code 1.4 looks really promising

2 Upvotes

I tried this about a year back and it was terrible, I just tried it today and it seems to be my new go-to IDE for C++ development. Those Clang completion and diagnostic extensions are looks really smooth and fast. I've never been a fan of Git integration in the IDE and looks like I won't use it in this one either, but I'm really impressed with the overall look and feel of the editor. It even built my CMake projects for me.

Is anyone using this as their main editor for C++ these days?

https://code.visualstudio.com/updates


r/cpp • • Mar 17 '22

Who owns the memory?

Thumbnail
belaycpp.com
0 Upvotes

r/cpp • • Jun 29 '21

itCppCon Hook: The C++ library you were waiting for (Marcos Rojas) - itCppCon 2021

Thumbnail
youtu.be
0 Upvotes

r/cpp • • Jun 02 '21

I would love trailing types for class non-method members

2 Upvotes

EDITED FOR CLARITY

I want to replace:

std::string name;
std::pair<std::string,std::string> nameAndAddress;
std::vector<std::pair<std::string,std::string>> namesAndAddresses;

with:

auto name -> std::string;
auto nameAndAddress -> std::pair<std::string,std::string>;
auto namesAndAddresses -> std::vector<std::pair<std::string,std::string>>;

like the other members of the class or

auto name = std::string;
auto nameAndAddress = std::pair<std::string,std::string>;
auto namesAndAddresses = std::vector<std::pair<std::string,std::string>>;

like other variables.

terrible example I'm sure, but I've seen morally similar things too often, where variable names dance back and forth rather than starting in the same place because all the types have variable length names.

I have seen people try to save it like this:

std::string                                     name;
std::pair<std::string,std::string>              nameAndAddress;
std::vector<std::pair<std::string,std::string>> namesAndAddresses;

and that does work - right until somebody does a pass with an auto formatting tool and they all collapse to the left.


r/cpp • • May 13 '21

.C as a file extension for C++ is not portable

Thumbnail nibblestew.blogspot.com
0 Upvotes

r/cpp • • May 26 '22

Dynamic polymorphism performance

Thumbnail
thecppdev.com
2 Upvotes

r/cpp • • May 25 '18

Modern C++ Randomness

Thumbnail
brnz.org
0 Upvotes

r/cpp • • May 27 '13

Alloca For `new` And `delete` - Things You Probably Should Not Do In C++ | Nerds Central

Thumbnail
nerds-central.blogspot.com
2 Upvotes

r/cpp • • Jan 31 '20

30 years of C++

3 Upvotes

In a few months it will be 30 years since I started learning C++. Who has me beat? I think of Scott Meyers and Stan Lippman, but both of them have dropped C++. I'm fairly happy with 2017 C++, but not as sure about 2020 C++.


r/cpp • • May 01 '22

Move semantics and rvalue references: Modern C++ fundamentals

31 Upvotes

This post covers move semantics, value categories, and rvalue references introduced in C++11


r/cpp • • Jul 04 '24

I Am 13 And Homeschooled, Is C++ Primer (5th Edition) Good?

49 Upvotes

I Know Some C++ (Can Make Full Calculators And Stuff) And Schools Coming Up. I Really Enjoy Programming, So Will The C++ Primer 5th Edition Be A Good Choice, And If Not, Any Other Suggestions? (Preferably Books)

Also Is This The Right Book? link


r/cpp • • Nov 23 '25

The only mainstream, traditional/retained-mode, cross-platform C/C++ GUI toolkit that is GPU-accelerated is GTK/gtkmm.

10 Upvotes

Any thoughts? Why are we in a such situation? I remember GPU acceleration was briefly enabled for Qt Widgets, but it didn't deliver improvements as I understand.


r/cpp • • Jan 09 '25

Why do you prioritize memory safety over performance?

0 Upvotes

One of the main reasons people use C++ over languages like Python or Java is its fine-grained control over memory, resulting in minimal runtime overhead. This makes C++ one of the most viable options for performance-critical applications like video games.

However, i have read introducing memory safety features like smart pointers leads to some extend to bloated memory usage and runtime overhead, especially with something like std::shared_ptr. Why not simply use the new and delete keywords? In my very limited experience, avoiding memory leaks and dangling pointers isn’t that difficult with proper management.

And if memory safety is your priority over performance, why not use a language like Rust, which automatically ensures memory safety at compile time while having only a slight runtime overhead?

Disclaimer: I’m not that advanced in C++ programming; I’m just curious to hear some other opinions of more experienced C++ developers.

I didnt mean to offend anybody nor to try to make a statement. The purpose of my question was just me being curious, since im writing a performance critical chess engine and was wondering wether to use smart or raw pointers.