DEV Community

Caleb (pxlmastr)
Caleb (pxlmastr)

Posted on • Edited on

1 2 1 1 1

My Experience Learning C++ (so far)

std::cout << "Hello, World!";

For those of you who don't know me (i assume all of you don't. Just assuming), my name is Caleb, and I'm a 16-year-old high school student who is persuing a tech career in the future.

I've developed in a lot of different languages in the past, including:

  • Scratch (my first 😉)
  • Python 🐍
  • Bash (doesn't count, but kinda got me into programming)
  • Javascript, and
  • Rust.

All five of these languages hold a special place in my heart, but I decided that I need to learn a language that can get me a job in the future, so I did some research, and found these:

  • Java
  • C#
  • C++

Now, don't roast me for this, but I absolutely HATE Java. It seems so complex to write just a simple program, and I tend to agree with the memes that the only applicable use case is Minecraft.

steve;

Also, C# seems to be decent, but complex as well. It seems to me that the best language out of these three is C++, as it's used in countless places including gaming, servers, IOT, and more. So, I had a clear choice.

It Begins.

The first thing I ever did in C++ was try to create a project without guides. (our power was out, so I couldn't use the internet.) So, what did i do?

I excitedly pulled up my terminal, ran

~$ c++ init
Enter fullscreen mode Exit fullscreen mode

and was bamboozled that for some reason in this world, it didn't work.

After our power came back on, I decided to actually google what the package manager was for c++, and how to initialize a project for it.

I searched and searched for FOUR WHOLE HOURS for a package manager, and never found one that was official.

Eventually, I understood that you needed to make the files and folders yourself, and facepalmed myself about 10 times, giving myself both a nosebleed and an excuse to go to the bathroom.

My first thoughts

There were a few things that i noticed at first:

1. The type goes BEFORE the variable.

confused nick

So, I desperately searched for a way to make stuff simpler, and found this, which made me finally feel at-home with variable definition:

auto myvariable = type();
Enter fullscreen mode Exit fullscreen mode

Finally, closure.

This got me quickstarted, making a few small projects like a number-guessing game and a smol calculator.

2. Project Structure

Many people tend to space their functions out into different files, and then compile them altogether. I mean, this is alright, but I prefer to keep my main functions inside main.cpp and then just compile everything together.

3. What's the masco- WHAT IN THE DEVIL'S NAME IS THAT

fat rat

"The mascot for C++ is an obese, diseased rat named Keith, whose hind leg is missing because it was blown off."

This was the first time I severely considered just quitting, because of I missed the days of cute, fun mascots like this:



But, I pushed on, and I'm still learning.

What's next

  • OOP
  • Memory management
  • Algorithms

Oh well, it'll be fine.

Thanks for reading! Have a good day dudes

Want to support me? Watch an ad

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

AWS Q Developer image

Your AI Code Assistant

Generate and update README files, create data-flow diagrams, and keep your project fully documented. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay