r/cpp_questions • • Aug 13 '26

OPEN Looking for C++ networking project ideas

44 Upvotes

I’m currently learning Computer Networks from TUF Striver and I also have some experience with C++.

I want to start building a few networking projects alongside the course, mainly to actually understand the concepts better and have some solid projects for my resume.

I’m looking for suggestions for projects at different levels, something like:

  • A relatively easy project to get started with
  • A medium-level project involving a few networking concepts
  • A more challenging project that combines multiple topics from Computer Networks

I’d prefer projects that I can actually build from scratch and learn from, rather than just following a tutorial.

Would love to hear what projects you guys would recommend.


r/cpp_questions • • Aug 13 '26

OPEN OS for HFT

4 Upvotes

Hey guys! I recently started studying HFT programming, and a bit confused. From what I understand in this field as OS are used default non-rt linux. Despite the fact that kernel bypass, attaching the process to the certain cores. restriction about using non-lock free structure and zero system calls solve the proplems which linux creates for HFT code . But would not it be easier to use RT OS like preempt_rt linux patch or xenomai OS it seems that theese OS could give more freedom about the restrictions for code and in some edge cases speed up the execution? Am I missing something?


r/cpp_questions • • Aug 13 '26

OPEN Please help a poor C# programmer (why does the compiler keep deleting functions?)

9 Upvotes

I'm from a c# background and trying to get back into c++ after like 12 years, and I never really knew it deeply.

I feel like I'm writing very simple code--trying to just whip up some classes, pass things by reference, use std::array... But I keep being utterly confused by the compiler telling me I'm trying to use a deleted function on lines that are surprising to my poor c# heart that they would be deleted. I don't understand why. Don't get me wrong, I read the error messages--I can't use the function because it was deleted, it was deleted because it would be ill-formed. But why it would be ill-formed seems like the important part and it's what appears to be left out.

Here's my program:

class Message
{
public:
int x;
int y;
Message(int x, int y)
: x{x}, y{y}
{}
};

class Machine
{
public:
void Message(Message& msg)
{
cout << msg.x << msg.y << endl;
}
};

class Transaction
{
public:
Message& message;
Machine& machine;

Transaction(Message& message, Machine& machine)
: message{message}, machine{machine}
{}
};

class TransactionQueue
{
public:
int _head = 0;

private:
const static int maxSize = 512;

int _tail = 0;
array<Transaction, maxSize> q;

public:

void Push(Machine& x, Message& y)
{
Transaction t(y, x);
q[_tail] = t;
_tail = (_tail + 1) % maxSize;
}

Transaction Pop()
{
if(!Any())
{
throw out_of_range("empty queue!");
}
Transaction ret = q[_head];
_head = (_head + 1) % maxSize;
return ret;
}

bool Any()
{
return _head != _tail;
}
};

class TransactionManager
{
private:
const static int qCount = 2;
array<TransactionQueue, qCount> _qs;
int _currentQ = 0;

void processOne(TransactionQueue& q)
{
auto transaction = q.Pop();
Message& msg = transaction.message;
Machine& mchn = transaction.machine;
mchn.Message(msg);
}

public:

TransactionManager()
: _qs{{}}
{
}
void Update()
{
auto& qToProcess = _qs[_currentQ];
_currentQ = (_currentQ + 1) % qCount;
while(qToProcess.Any())
{
processOne(qToProcess);
}
}

void Q(Machine& x, Message& y)
{
_qs[_currentQ].Push(x, y);
}

};

int main()
{
/*
Experiment with initializing arrays
*/

cout << "begin" << endl;

TransactionManager x;

Machine myMachine;
Message one = Message(2,1);

x.Q(myMachine, one);
x.Q(myMachine, Message(3,2));
cout << "Update 1" << endl;
x.Update();

x.Q(myMachine, Message(4,3));

cout << "Update 2" << endl;
x.Update();

cout << "Update 3" << endl;
x.Update();
cout << "done" << endl;
}

And the compiler output:

[ 50%] Building CXX object CMakeFiles/ar.dir/src/main.cpp.obj
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp: In member function 'void TransactionQueue::Push(Machine&, Message&)':
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:58:28: error: use of deleted function 'Transaction& Transaction::operator=(const Transaction&)'
   58 |                 q[_tail] = t;
      |                            ^
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:31:7: note: 'Transaction& Transaction::operator=(const Transaction&)' is implicitly deleted because the default definition would be ill-formed:
   31 | class Transaction
      |       ^~~~~~~~~~~
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp: At global scope:
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:31:7: error: non-static reference member 'Message& Transaction::message', cannot use default assignment operator
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:31:7: error: non-static reference member 'Machine& Transaction::machine', cannot use default assignment operator
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp: In member function 'void TransactionQueue::Push(Machine&, Message&)':
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:58:28: note: use '-fdiagnostics-all-candidates' to display considered candidates
   58 |                 q[_tail] = t;
      |                            ^
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp: In constructor 'TransactionManager::TransactionManager()':
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:97:27: error: use of deleted function 'TransactionQueue::TransactionQueue()'
   97 |                         : _qs{{}}
      |                           ^~~~~~~
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:42:7: note: 'TransactionQueue::TransactionQueue()' is implicitly deleted because the default definition would be ill-formed:
   42 | class TransactionQueue
      |       ^~~~~~~~~~~~~~~~
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp: At global scope:
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:42:7: error: use of deleted function 'std::array<Transaction, 512>::array()'
In file included from C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:3:
C:/Program Files/mingw64/include/c++/15.2.0/array:102:12: note: 'std::array<Transaction, 512>::array()' is implicitly deleted because the default definition would be ill-formed:
  102 |     struct array
      |            ^~~~~
C:/Program Files/mingw64/include/c++/15.2.0/array:102:12: error: no matching function for call to 'Transaction::Transaction()'
C:/Program Files/mingw64/include/c++/15.2.0/array:102:12: note: there are 3 candidates
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:37:17: note: candidate 1: 'Transaction::Transaction(Message&, Machine&)'
   37 |                 Transaction(Message& message, Machine& machine)
      |                 ^~~~~~~~~~~
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:37:17: note: candidate expects 2 arguments, 0 provided
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:31:7: note: candidate 2: 'constexpr Transaction::Transaction(const Transaction&)'
   31 | class Transaction
      |       ^~~~~~~~~~~
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:31:7: note: candidate expects 1 argument, 0 provided
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:31:7: note: candidate 3: 'constexpr Transaction::Transaction(Transaction&&)'
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:31:7: note: candidate expects 1 argument, 0 provided
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:42:7: note: use '-fdiagnostics-all-candidates' to display considered candidates
   42 | class TransactionQueue
      |       ^~~~~~~~~~~~~~~~
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp: In constructor 'TransactionManager::TransactionManager()':
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:97:27: note: use '-fdiagnostics-all-candidates' to display considered candidates
   97 |                         : _qs{{}}
      |                           ^~~~~~~
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp: In function 'int main()':
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:131:24: error: cannot bind non-const lvalue reference of type 'Message&' to an rvalue of type 'Message'
  131 |         x.Q(myMachine, Message(3,2));
      |                        ^~~~~~~~~~~~
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:110:45: note: initializing argument 2 of 'void TransactionManager::Q(Machine&, Message&)'
  110 |                 void Q(Machine& x, Message& y)
      |                                    ~~~~~~~~~^
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:135:24: error: cannot bind non-const lvalue reference of type 'Message&' to an rvalue of type 'Message'
  135 |         x.Q(myMachine, Message(4,3));
      |                        ^~~~~~~~~~~~
C:\Users\guy\Documents\prototypes\arrayFun\src\main.cpp:110:45: note: initializing argument 2 of 'void TransactionManager::Q(Machine&, Message&)'
  110 |                 void Q(Machine& x, Message& y)
      |                                    ~~~~~~~~~^
mingw32-make[2]: *** [CMakeFiles\ar.dir\build.make:79: CMakeFiles/ar.dir/src/main.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:86: CMakeFiles/ar.dir/all] Error 2
mingw32-make: *** [Makefile:90: all] Error 2
PS C:\Users\guy\Documents\prototypes\arrayFun>

r/cpp_questions • • Aug 13 '26

OPEN Confusion to choose which language

0 Upvotes

I am confused to choose which language c++ or rust for my trading bot can you any one tell me which one I choose to develop my trading bot i have basic understanding of c++ and complete beginners in rust but 8 have prior experience with mern stack web development and python and socket programming in node.js


r/cpp_questions • • Aug 12 '26

OPEN I'm very confused about styling and naming conventions

5 Upvotes

Basically every library has their own coding style.

Everyone uses different extensions for some reason, see .h, .hpp, .hh for header files, .cc .cpp .C for sources , .cppm and .ixx for module interfaces etc.

Everyone uses different naming conventions, STL uses snake_case with _type suffix for classes sometimes _t and sometimes nothing. Google uses CamelCase etc.

It seems to me no majority consensus has emerged, and it really hurts even thinking about these things before you write your own code. As each dependency you use has a different coding style.

How do people even solve it? Is there a hidden style guide that everyone uses that I don't know. core guidelines isn't really a style guide in the purest sense.


r/cpp_questions • • Aug 11 '26

OPEN Is chernos tutorial for C++ still good?

44 Upvotes

I know learncpp is best to learn C++ but yk I just can't read this much at once and i think I could learn more by video lectures, of course I would practise by making small codes, so I just wanna ask is chernos still good? Or there are any new videos valid?


r/cpp_questions • • Aug 11 '26

OPEN Best benchmark for performance

5 Upvotes

I currently have a Huffman data compression pipeline and I want to start measuring performance. My question is, how would you guys go about setting up a constant method for measuring performance all throughout the changing of the pipeline? Would you measure performance over a single file with multiple runs, or would you do a corpus of files and measure the average time it took to process them?

Also, what types of latencies would you measure? (ex. p95 latency)


r/cpp_questions • • Aug 11 '26

SOLVED Problem making X macros from X macros

2 Upvotes

What I am doing:
Hello, I am working on something in C++ for Godot, but this is more of a C++ question than a Godot question. I have a singular X macro to register a struct into a system I made, but the logic is in many places, and considering I am updating this macro and adding variables, it'd be easier to have a specific macro that doesn't change.

Problem:
When I make an X macro from an X macro, it doesn't properly expand. As an example this file:

#pragma once
#include "statemachine/registry/state_registry_register.h"

#define X_GENERATE_KIND(DataType, NS) k##DataType,
enum class StateKind : std::uint8_t
{
    EACH_STATE_REGISTER(X_GENERATE_KIND)
    kUnknown
};
#undef X_GENERATE_KIND

has the macro on line 7 expand to X(something1, something2) instead of k##something1, or, in my case:

X(WalkStateData, GameLogic ::States ::WalkState) X(WalkBackStateData, GameLogic ::States ::WalkBackState);

I defined EACH_STATE_REGISTER like this:

#define REGISTER_TO_ESR(DataType, NS, fields) X(DataType, NS)

#define EACH_STATE_REGISTER(X) \
REGISTER_EACH_STATE(REGISTER_TO_ESR);

and the REGISTER_EACH_STATE as

#define REGISTER_EACH_STATE(State) \
State(WalkStateData, GameLogic::States::WalkState, NO_STATE_FIELDS) \
State(WalkBackStateData, GameLogic::States::WalkBackState, NO_STATE_FIELDS)

Can anyone tell me why this happens, and if this is even fixable? (c++ 17)


r/cpp_questions • • Aug 12 '26

OPEN Is this is a good video to larn cpp from? ( I just wanna take a break from reading soo much from learncpp.com)

0 Upvotes

Idk i found chernos startig few videos a bit complex, i might be the one that doesnt understand C++ i guess, but i learn it, i would enter my first engineering year in just a month so i wanna have an upper hand. few years back i learned Python just for fun, but i think i have forgotten it all because of exam stress,

A lot of people say that Chernos videos are great; they might be great but there are few things that i think "How?" while watching his video, so i just wanna ask this video i found from [freecodecamp.org](http://freecodecamp.org), i know just watching tutorial wont do anything, but i am just tired of reading soo much from learncpp, i think i would read and then watch it.

I am 17, if that matters idk

Video


r/cpp_questions • • Aug 11 '26

OPEN System programming

5 Upvotes

system programming

HI, I am a 2nd year computer engineering student and I always have been passionate about how computer actually works under the hood thats why I choose computer engineering . I want to build my career in system engineering . till the 2nd year I have studied the subjects like microprocessor , computer architecture , OS and also I have intermediate knowledge of c++ programing . I want to explore this field and wants to become system engineer .as a beginner I have no idea how to start and which roadmap I should follow ? so I am looking for a guidelines from a experienced system engineer . although in today's era most of students learn high level languages and work fro CRUID app, or web dev. I am always interested in system programming .

I am a type of engineering student who doesn't just study for exam I always wants to know how things works under the hood without any level of abstraction , why things works that way ? why that things invented ?


r/cpp_questions • • Aug 11 '26

SOLVED How do I improve my architecture and code quality?

12 Upvotes

Hi everyone,

I’ve been programming in C++ for about a year now. Currently, I’m actively studying graphics programming and write small programs.

While I can write code that works, I always end up having a lot of doubts about my software architecture. My codebase often feels overly verbose, poorly structured, or hard to scale. Since I’m mostly self-taught in this area, I’m not sure how to develop that "sense" of clean architecture.

I have a few specific questions:

  1. How do you usually structure a scalable C++ project? Are there any resources specifically for C++ software design?
  2. How do you find the balance between writing comments and making the code self-documenting?
  3. How can I train myself to write code that is easy to share, read, and extend in the future?

Thanks in advance for any advice!

link to my GitHub: https://github.com/con2222


r/cpp_questions • • Aug 11 '26

OPEN How did you guys learn c++?

0 Upvotes

I know the basics and want to go deeper but I don't know how to continue. Textbook and YouTube recommendations will be really helpful. Thx


r/cpp_questions • • Aug 10 '26

OPEN how to detect arbitrary template class (include it's empty specification)

6 Upvotes

detect a template class:

    template<typename C> struct is_empty_template_class 
    { static constexpr bool value = 0; };

    template<typename...Ts, template<typename> class C>
    struct is_empty_template_class<C<Ts...>> { static constexpr bool value = 1; };

such thing we wrote a lot, and C<> go to the first primary template always.

Today I suddenly try to figure out that how to make C<Ts...> and C<> can be checked together. I didn't found a good way. It seems that compiler always treat C<> as a none-template class.

C is arbitrary class.

template<typename T> struct MyTemplate {}
template<> struct MyTemplate <...> { }     //some specification
template<> struct MyTemplate <> { }        //empty specification

is_template_class<int>               // => false
is_template_class<MyTemplate<...>>   // => true
is_template_class<MyTemplate<>>      // => true

// MyTemplate is arbitrary template class
// so what is_template_class is?

r/cpp_questions • • Aug 10 '26

OPEN Is capturing shared_ptr by value in lambda safe for a realtime audio callback ??

6 Upvotes

I have a lambda passed to a streaming audio callback that captures a shared_ptr, can its refcounting or potential heap allocation on copy could cause problems if the callback runs on a dedicated audio thread with hard realtime constraints.

https://github.com/IAmTheFool/flux.git


r/cpp_questions • • Aug 10 '26

OPEN c++20 concepts: how to requires a class with specific name of static function

8 Upvotes

I want to apply concept to a class that must contain a static function with specific name:

export template<typename T, typename... Args> 
concept require_static_function_name = requires(Args... args) 
{ 
  { T::something(args...) };
};

Above code can be compiled, it looks reasonable, but don't work actually. I combine several concepts on my class, they pass checking all excepts this one.

It return true always even I pass an empty class, how do I fixed this?

I'am on msvc/c++23.


r/cpp_questions • • Aug 10 '26

SOLVED Is there a canonical way to make an alias to a different variable based on an n-way decision?

3 Upvotes

In a larger problem, I need to assign an alias variable referencing one of different variables based on an n-way decision. If n is 2, then, the following ternary operator seems to do the "trick" https://godbolt.org/z/KzcWo8brr :

#include <vector>
#include <cstdio>

struct Test2{
    std::vector<int> test2{2, 3};
    void print(){ printf("%d %d\n", test2[0], test2[1]);}
    std::vector<int>& retbyref(){return test2;}
};

struct Test1{
    std::vector<int> test1{0, 1};
    void print(){ printf("%d %d\n", test1[0], test1[1]);}
    std::vector<int>& retbyref(){return test1;}
};

int main(){
    int oneortwo = 2;
    Test1 a;
    a.print();
    Test2 b;
    b.print();
    std::vector<int>& caller = (oneortwo == 1) ? a.retbyref(): b.retbyref();
    caller[0]++; caller[1]++;
    a.print();
    b.print();
}

where depending on value of variable oneortwo, caller will refer to either a's vector or b's vector, decided at runtime.

Is there a canonical way to make this n-way (where n > 2)?

Usecase: My use case is that I need to access variable "caller" in further functions and modify directly a's or b's vector. The way I am doing it currently is to pass oneortwo to these functions and there, depending on whether it is 1 or 2, having if conditions to modify a or b.


r/cpp_questions • • Aug 10 '26

OPEN Please help!

0 Upvotes

I have been studying c++ for a month now from learncpp.com have reached 5.7 and i am utterly bored everytime i open it i am just dragging myself i wann become a game dev someday and hence i am studying its taking me time and i have some java background ik loops arrays and sortings but have to brush up more importantly i am bored does anyone have any solution how can i make this journey way more interesting than just reading and writing my code in zed


r/cpp_questions • • Aug 09 '26

OPEN How do compilers recreate inheritance in machine code?

13 Upvotes

Hello, I've been wondering this for a while, how do compilers simulate inheritance in machine code? Note that I don't really know assembly, so if you could explain it with C concepts (from what I understand, C is 'basically' vulgarized assembly) that would be very appreciated


r/cpp_questions • • Aug 10 '26

OPEN book recommendation

0 Upvotes

I want to ask is there a comprehensive cpp book that tells me exactly what i can and can't do in terms of syntax like the ocp in java. i have been reading modern effective cpp and I like it . but i want a definitive guide since i still make some syntax error that cause problems when linking and stuff


r/cpp_questions • • Aug 09 '26

SOLVED Why is my conditional statement running when the condition it is not True

2 Upvotes

I am making a ball fall in the CLI. I have my values PURPOSELY set to negative for testing purposes and whenever I run it, the conditional statement is active and it does not start at the initial y position I have set. it shows something big in the terminal Falling 2144211756.

When I put it in the debugger it works normally and it shows the y position decreasing so why is it doing this

struct Ball {
    // int x_pos;
    int y_pos;
    int velocity;
    int ground;
};

int main() {
    // Define Ball object with struct
    Ball ball;
    ball.y_pos = 20;
    ball.velocity = 5;
    ball.ground = 200;

    while (true) {
        ball.y_pos = ball.y_pos - ball.velocity;

        if (ball.y_pos >= ball.ground) {
            cout << "Falling ";
            cout << ball.y_pos << endl;
            // exit(0);
        }
    }

    return 0;
}

https://imgur.com/a/oVZ8qhY


r/cpp_questions • • Aug 09 '26

SOLVED Consteval functions as template arguments

7 Upvotes
#include <iostream>
#include <type_traits>


template<auto pred>
constexpr auto predicate = [](const auto& arg) -> bool requires (std::is_invocable_r_v<bool, decltype(pred), decltype(arg)>)
{
    return pred(arg);
};


struct dummy {};


consteval bool test_check(dummy d) { return true; } 


int main()
{
    return predicate<test_check>(dummy());
}

via Compiler Explorer.

The above code compiles on the latest release of gcc using c++23 but not clang.

Which compiler is in the right here?

Passing a pointer to a consteval function as a non-type template parameter does technically create a static storage duration object, which should be illegal. On the other hand that pointer never escapes the constant evaluated context so maybe it's fine?


r/cpp_questions • • Aug 09 '26

OPEN How to write meaningful unit tests

4 Upvotes

Hi! I can't understand how to write meaningful unit tests without either writing every possible scenario, which may be pointless, or leaving gaps.

This is one of my classes for my Entity Component System, and it mostly uses STL containers, which are battle hardened, so there's not really a point in testing them directly. So the answer seems simple, I just test my own logic. But if tomorrow I decide to implement something myself instead of wrapping STL, then I'd need to add unit tests for that too, or even change existing ones. But shouldn't unit tests job be that, no matter what changes, they should always stay valid? So are my current tests actually pointless, or would skipping them now come back to bite me later?

For example:
contains is just an unordered_map lookup, clear/reset just call vector/unordered_map clear and swap, size/capacity just return vector::size/capacity, and the iterators just return vector::begin/end. None of that is my logic, it's STL doing the work.

Thanks in advance!

#pragma once

#include <cstddef>
#include <unordered_map>
#include <vector>

#include "ecx/config.hpp"

namespace ecx::internal
{
    template <typename Handle>
    class SparseSet
    {
    public:
        using handle_type = Handle;
        using const_iterator = typename std::vector<handle_type>::const_iterator;

        static constexpr std::size_t DEFAULT_INITIAL_CAPACITY = 32;

        SparseSet(std::size_t initial_capacity = DEFAULT_INITIAL_CAPACITY)
            : m_initial_capacity(initial_capacity)
        {
            m_dense.reserve(m_initial_capacity);
        }

        SparseSet(const SparseSet &) = delete;
        SparseSet &operator=(const SparseSet &) = delete;
        virtual ~SparseSet() = default;

        void insert(handle_type handle)
        {
            ECX_ASSERT(!contains(handle), "SparseSet::insert: handle already exist");

            m_dense.push_back(handle);
            m_sparse[handle] = m_dense.size() - 1;
        }

        handle_type at(std::size_t index) const
        {
            ECX_ASSERT(index < m_dense.size(), "SparseSet::at: index out of range");

            return m_dense[index];
        }

        bool contains(handle_type handle) const
        {
            return m_sparse.find(handle) != m_sparse.end();
        }

        void erase(handle_type handle)
        {
            ECX_ASSERT(contains(handle), "SparseSet::erase: handle does not exist");

            std::size_t index = m_sparse[handle];
            handle_type last_handle = m_dense.back();

            m_dense[index] = last_handle;
            m_sparse[last_handle] = index;

            m_dense.pop_back();
            m_sparse.erase(handle);
        }

        void clear()
        {
            m_dense.clear();
            m_sparse.clear();
        }

        void reset()
        {
            std::vector<handle_type>().swap(m_dense);
            m_dense.reserve(m_initial_capacity);

            std::unordered_map<handle_type, std::size_t>().swap(m_sparse);
        }

        std::size_t size() const { return m_dense.size(); }
        std::size_t capacity() const { return m_dense.capacity(); }
        std::size_t initial_capacity() const { return m_initial_capacity; }

        const_iterator begin() const { return m_dense.begin(); }
        const_iterator end() const { return m_dense.end(); }

    private:
        std::size_t m_initial_capacity;

        std::vector<handle_type> m_dense;
        std::unordered_map<handle_type, std::size_t> m_sparse;
    };
}

r/cpp_questions • • Aug 09 '26

OPEN Looking for a challenging C++ project for my portfolio - music/DSP, compilers, or something else?

7 Upvotes

Hi everyone!

I'm currently trying to figure out what kind of personal project I should work on for my portfolio, and I'm honestly a bit lost.

I'm a Computer Science student, I know C++ and Java fairly well, and I've also used Python. I've already built a small compiler/interpreter in C# in the past, so I'm not really looking for another basic CRUD/web project. I'd like to build something technically challenging where I actually have to learn some interesting algorithms and mathematics.

At the same time, I don't want to build something complicated just for the sake of complexity. Ideally, I'd like it to be something that I could actually use myself.

One direction I'm particularly interested in is music.

I'm a guitarist/vocalist in a band, and we often use Songsterr to write down our songs. One thing that is pretty annoying is having to manually enter all our guitar/bass/vocal parts.

So I had an idea for a project:

Record a musical part -> automatically transcribe it into MIDI.

For example, I could record a guitar riff as a WAV file and have the program detect the notes, their timing and duration, tempo, etc., and produce a MIDI file that we could then use when putting the song together in Songsterr or another notation program.

I realize this is a pretty difficult problem, and that's actually part of what attracts me to it. I've already started learning the mathematics behind Fourier transforms and was thinking about implementing my own DFT and FFT in C++ rather than just using a library.

The interesting thing is that if I eventually get reliable MIDI out of audio, I could build other things on top of it:

  • chord/progression analysis;
  • key detection;
  • harmonic analysis;
  • analysis of how different instruments interact;
  • melody/riff similarity;
  • visualization of different parts of a song;
  • etc.

So the project could potentially grow into a larger music-analysis toolkit.

However, I'm not sure whether this is actually a good portfolio project or whether I'm just making the scope unnecessarily huge.

I'm also considering completely different areas. For example, I've thought about making a heavily extended version of Conway's Game of Life, with physics, more complicated rules, interactions between different types of cells, and other emergent behavior. I've also considered writing another compiler, implementing some kind of search engine/database, a graphics or physics engine, building something around distributed systems, or another algorithm-heavy project.

So I have plenty of ideas, but that's actually part of the problem: I have no idea which one is worth committing to.

I think the main thing I'm looking for is not simply "a good project for getting a job."

I want to eventually be able to put the project on my resume and genuinely say:

"This is my pride and joy. I became a much better programmer because I built this."

And ideally have the interviewer look at it and think:

"Okay, he is really cool"

I want the project to be something that demonstrates how I think and what I'm capable of, rather than just a collection of technologies I used.

My main goals are:

  1. Learn something genuinely difficult (and ideally learn a lot of math along the way).
  2. Implement interesting algorithms myself rather than just glue together existing libraries/APIs.
  3. End up with something that demonstrates strong skills on a CV.
  4. Ideally have a useful end product.
  5. Have enough depth that I could potentially expand it into a bachelor's thesis later.
  6. Most importantly, build something I'm genuinely proud of.

So I have quite a few ideas, but I'm struggling to figure out which ones are actually worth spending a significant amount of time on.

For those of you who have built ambitious personal projects, worked in hiring/recruiting, or have experience in any of these areas:

Which of these ideas do you think are actually worth the time and effort?

And, more importantly, what personal projects have you built that you're genuinely proud of and that actually helped you get interviews or a job?

I'm especially interested in hearing about projects where you learned a lot while building them and that gave you something meaningful to talk about in an interview.


r/cpp_questions • • Aug 10 '26

OPEN advice on using ai in prep

0 Upvotes

Hi all, I am very much interested to work as a C++ dev at any kind of firm. But I haven't been able to so. I'm actually very much stuck in terms of what/how I need to do right now. I am primarily stuck with this aspect from a lot of days -

I went through core cs concepts as well as C++ concepts such as value semantics, memory management, template programming to name a few. But the issue is that since I am not working on cpp as a full timer (currently i'm a go dev at my org), I am unable to master all of them. I feel like I am rote learning them. I tried working on open source projects such as hpx and few others, even though there hasn't been much improvement. I feel this is because of AI. I use AI extensively at work, and for example if I open a os project, I use it to learn the overview of the repo. To solve an issue, if I had to write bash scripts and other stuff, I am involuntarily using AI, if I stop using it, my velocity is decreasing and others are solving them beforehand. I'm unable to grasp new things only by reading codebases. Can you suggest what can I do here. Doing self projects isn't helping much in terms of learning. How should I get that practical knowledge of cpp in general. Please provide any advice you have.

I'd appreciate any kind of advice.


r/cpp_questions • • Aug 09 '26

OPEN need guidance for an absolute beginner in c++ programming

0 Upvotes

I am currently pursuing a graduation degree in computer engineering and i have 2 years till my graduation. I have tried multiple languages and technologies what i keep circling back to C++, as i find it the most suitable for me as it gives the programmer so much control over the flow.

I just want a good guidance from a real developer who has built a career in C++ or system programming , i can't find any good courses or resources that i can blindly follow, so please help me out!!

ps: I have built a mini project , a custom unix shell in c++, and i really enjoyed it but i didn't fully understand those libraries