r/cpp_questions • • 17h ago

OPEN Career advice

0 Upvotes

Am currently studying c++ hopefully to try to get into game development as a junior gameplay programmer yet there is so much heat in the market cuz of ai and companies lay offs and right now the entry level is so high they require so much knowledge so am lost as to where to go stay on that track or start learning data engineering like python sql since it's an uprising field due to ai

What would you advise me with


r/cpp_questions • • 11h ago

OPEN Dumb question for someone still learn c++

8 Upvotes

Hi ppl, dumb question for you, do you think is recommended clone minecraft from scratch?. Right now i am chapter 2.12 from learcpp.

My question is it the best way for learn and get some experience or still i am keeping study and reinfoce the base?. sorry for my english


r/cpp_questions • • 8h ago

OPEN Are there any other ways to check if a char is equal to different values?

9 Upvotes

I'm working on some homework for class where I'm checking if a character is equal to: '+', '-', '/', or '*' for this postfix to infix converter.

I know I'm able to do this in two ways I can think of with:

// 1.
if (c == '+' || c == '-' || c == '/' || c == '*') {
  // Code
}

// or 2.
bool isOperator(const char c) {
  return (c == '+' || c == '-' || c== '/' || c == '*');
}
...
if (isOperator(c)) {
  // Code
}

But is there another way to do this that's shorter? Maybe something along the lines of this?

if (c == {'+', '-', '/', '*'}) {
  // Code
}

I looked on cpp reference and stack overflow but I wasn't able to find an answer. And to be fair option 1 and 2 work just find, I'm just curious if there are other methods out there that I'm not familiar with. Thanks!


r/cpp_questions • • 16h ago

OPEN How can I learn to think logically when solving programming problems?

1 Upvotes

At college, I try to study as hard as I can; during computer science and programming classes, I make an effort to grasp every topic, and I practice a lot at home—even using an AI assistant—but it all feels like it’s for nothing. When it comes to practical assignments, I just can’t seem to formulate the code. What should I do?


r/cpp_questions • • 22h ago

OPEN How can I improve my game?

0 Upvotes

I made a textgame which is a console version of my future game and I want you to tell me what I did good and what I have to improve. These are screenshots of the textgame

The idea for the future game is here:

  1. Platforms:
    1. Mobie
    2. Computer
    3. Gaming console
    4. Microwave (it has to be satire for weak devices)
  2. Genre: Open World + RPG
  3. Engine: UE
  4. Graphical assets: Blender
    • Style: 3D Anime
  5. Multiplayer:
    1. Muliplayer story completion
    2. Tournaments:
    3. PvP arenas (included in the tournaments):
      1. 1v1
      2. 2v2
      3. 5v5
      4. 10v10
  6. No internet singleplayer option
  7. Character's amount: 10
  8. Chapters for every character: 10
  9. Parts for every chapter: 10

Tell me if this is realistic for a solo dev please.

The link to the game is here: https://onecompiler.com/cpp/44qwdefz6

The site about it is here: Soul Morph — official website

Important:

- You'll only be able to play this game on a computer or on a device with bluetooth keyboard (For some unknown reason)

- I only made the text version because I don't have a computer and therefore any possibility to make graphical/musical assets or to make the game with an engine. I made the game on a library laptop and school iPad

- It‘s version is currently 0.0.0.0.3.7

- The game is unfinished yet: Witch has the most playable story

- I’ve set a „debugger“ which maxes everything out (compiler only has approximately 2 minutes for compilation. Therefore this time is too short to max anything out yourself)

- Have fun


r/cpp_questions • • 2h ago

OPEN How to create project templates

5 Upvotes

Hi, I don't know if this is the right subreddit but I was wondering if anyone would be able to tell me if this is possible, and, if so, to give a step by step guide to how I could do it (I know it might involve extensions):

  • I am on Linux fedora, and lets say I have a completely fresh vscode install
  • I want to have a template I can easily access via ideally pressing a button on the left side panel or something like that
  • When creating a new project with this template, it should ask you for a directory of where to store the project and a name for it - this name should then be used as the folder name for the project in that directory
  • This project should be C++23, use UTF-8 encoding, and support all the features of C++23, such as modules, and include the standard module - this should all work with IntelliSense (or if vscode uses something different) "knowing" this
  • In the project, there should be 4 folders (like Visual Studio) - External Dependencies, Header Files, Resource Files, and Source Files. This is just for sorting my files but actually doesn't matter what I put where - the project acts as if everything is just in one folder, unorganised. In Source Files, by default there should be a file named main.cpp, which should be completely blank - not even int main() etc.
  • When compiling, I would like it to be compiled as an appImage file (where the name of the file is the project name, or the name of this file can be changed) (I hear appImage can run on pretty much any Linux distro - that's why), which, despite being my OS being pretty much the newest and updated fedora, is compiled as if I compiled it on the oldest version of fedora that my project would actually compile on (I hear Linux applications are backwards compatible but not forwards)
  • Also, when running, I should have the option to choose Debug or Release, and x64 or x86 (the defaults being Debug and x64). Then, in the project folder, a folder called "Dist" should be made, inside that "x64" and "x86" (only if ran/compiled for both), and inside each of them "Debug" and "Release" (only if ran/compiled), and inside them their respective versions of the appImage (only if ran/compiled, and should still just be named project_name.appImage (unless renamed)

Thanks to any help any of you can give, it is greatly appreciated - also, please can you tell me where things are that I haven't stated, e.g. where to change the name of the final appImage, where to change Debug or Release and x64 and x86.