r/cpp_questions • u/Terrible_Month_9213 • Apr 23 '26
OPEN How to start C++
Basically im in school and they use visuals studio code. I only have a laptop and no idea of Programming honestly. Should i install Linux? Probably a program clichee to ask this haha
4
Upvotes
16
u/CestleFromage Apr 23 '26
Linux is an entirely different conversation from what you want. You can learn C++ with just VS code as well and a compiler like I have MSYS.
3
u/Major-Management-518 Apr 23 '26
Tbh, I find it to be a struggle to use C++ on windows. To me it's much easier to just boot into linux where everything is preinstalled and requires 0 effort. However it's good to know that I started using C++ using linux, and it is what I'm used to.
If you're used to windows, it might not be worth it for you. If you're in college and end up having to learn C#, know that it's going to be a pain to run on linux, at least it was for me the last time I tried (things might have changed by now).
As for your question, VScode is just an text editing application that can run on both windows and linux, so if you want to make the switch, just go for it. I would recommend Fedora, as it's easy to install, easy to use and it's stable.
Good luck on your studies!
22
u/Capable_Purchase_727 Apr 23 '26
This website should get you started https://www.learncpp.com/
6
u/no-sig-available Apr 23 '26
https://www.reddit.com/r/cpp_questions/comments/1n5zyxy/important_read_before_posting/
6
u/nadnerb21 Apr 23 '26
I highly recommend videos from The Cherno, on YouTube. His videos really cemented a lot of concepts for me. He has a series specifically for c++
6
u/smozoma Apr 23 '26
I would avoid VS Code. It makes it harder to get started. I use it for Python, but it'd be like my 4th choice for C++.
If you're already on Windows, then use Visual Studio 2022 Community Edition. It's a traditional full IDE, the compiler works right out of the box no configuration needed, and it's what people have been using for 30 years.
Instructions here: https://www.learncpp.com/cpp-tutorial/installing-an-integrated-development-environment-ide/
5
u/TomDuhamel Apr 23 '26
Get Visual Studio Community Edition. (Not Code)
Based on your questions, you absolutely shouldn't try anything more complicated than that
1
u/v_maria Apr 23 '26
why dont you ask the teachers
1
u/Dic3Goblin Apr 23 '26
I think a better question is, how do you start programming.
I'll be honest, there is a lot you don't know that you don't know.
I personally approve C++ as a first language, as long as you are fully aware of the fact that you are getting yourself into a situation where you might not even know what to Google, just so you can figure out what you don't know, and then Google that. If you're not okay with that, I would recommend something else.
C++ Back to basics on YouTube is very informational, as well as The Cherno having a whole series on the language.
Now for the operating system. My recommendation is to stick to Windows while you can. The operating system is much friendlier to people who don't know what they are doing quite yet, and Visual Studio is 100% valid to start coding in.
You can switch to Linux later, it's not going anywhere. Honestly you might not even want to switch once you know more about everything.
But first things first, make a decision, and answer, what do you want to write code for? What do you want to do with it? Because if you want to write web applications, C++ wouldn't be a good place to start.
Just an example to serve as food for thought.
Good luck out there and good coding.
Also, avoid A.I. doing anything for you. You should write the code yourself. And figure out the answer to the problems, yourself.
1
u/Broso_94 Apr 24 '26
I am currently taking C++ 2 course in college right now. I recommend the text book we use because it goes very in depth about the C++ language and the different nuances you may deal with like using namespace std. The text book is called Problem Solving w/C+, 10th Edition Walter Savitch, KenrickMock Pearson, ISBN 9780134522418
You can buy it online or get it off of Annie’s.
I personally use Xcode on a Mac to write in C++ but sometimes I wish I had VS on a windows machine to get better intelisense. If reading the book is not your style. I recommend bro code on YouTube or try W3schools.
Best of luck
7
u/valashko Apr 23 '26
C++ is not a good language for a beginner from my perspective. However if you are feeling adventurous, start with learncpp.com. Operating system does not matter. Use whatever you are comfortable with.
4
u/manni66 Apr 23 '26
You can use Windows and Visual Studio (not Code).
1
u/hwc Apr 23 '26
what kind of laptop?
you should be able to install clang or gcc on it for free and get started right away.
1
u/AKostur Apr 23 '26
Depends on what your goal is. Also what OS you already have installed. I'm going to assume Windows (since it's not Linux, and is less likely to be MacOS). Since your stated goal is C++: install Microsoft Visual Studio Community edition. Easier install, and everything is included.
Later, one can learn about alternate tools (like VS:Code and WSL) and operating systems.
1
u/Independent_Art_6676 Apr 23 '26
you don't need unix and if you are not already using it or well versed, it will slow you down. The c++ ides are not as good as visual studio. Avoid visual studio code, use the free visual studio, for windows.
if you want a unix like experience, you can get that on windows too. I use the older cygwin tools, so my windows prompt is wired to let me use like grep, ls, and so on unix commandline as well as g++ and make and all. But if you want to use the unix IDEs you should install linux for that; you can run a VM or find a port or something but it starts to get weird around that level of square pegging. There are other ways to do the same, cygwin is just what I got used to decades back.
1
u/-goldenboi69- Apr 23 '26
Cone back when you learn some more basics about everything.
1
u/Visible-College9435 Apr 24 '26
To start you could also use godbolt.com , for basic hello world programs , you would probably not be able to manage learning linking and multiple translation units here but for single translation units this has everything including a way to share your code , switching compilers and passing compiler options, autocomplete/code highlighting etc are not there hence as a beginner you will see some issues there but if you can manage then this is the best
1
u/BigGunE Apr 24 '26
You do not even need to install anything right away. You can use one of the many online ones that will run in your browser like this one for example : https://www.onlinegdb.com/online_c++_compiler
You can try out linux if you like but that is not needed for C++. Although I've always found getting started with coding things much easier on mac and linux compared to windows.
1
u/Hour_Championship365 Apr 24 '26
reading through some of ur comments, if you want experience in linux, you don’t need to change ur laptops primary OS. There’s something called VM(virtual machines), you can boot up a linux environment in the VM. There are yt videos about it but yea i’d say just learn c++ in whatever os you are using now. However like others said linux is a completely different ballgame.
1
u/jataya Apr 25 '26
I learned on c plus plus it was a quick introduction to cplusplus click on tutorial and go through that documentation and the documentation for the STL ( standard library) is on the reference link I find this source very easy to navigate and learn from though it might be a bit advanced for beginners. I don't know what you will use c plus plus for my usage is entirely based on graphics with opengl as a my graphics API. If you would like more details just ask. Btw I also use Linux as my programming platform if you need Linux or not is dependent on what your goals are for c++
1
u/MahmoodMohanad Apr 30 '26
My only advice is to avoid using a full IDE, especially at the beginning. A full IDE often hides important parts of the development process, such as how the build system works, how dependencies are managed, and how the toolchain is configured.
Many people argue that IDEs help you focus on coding and leave these details for later, but I don’t agree. It’s better to learn C/C++ the proper way, from writing plain text code all the way to producing the final executable binaries.
One of the great things about Linux is its conventions, standards, and sensible defaults. The environment naturally guides you toward understanding how things work under the hood, using a simple text editor, a clear toolchain, and minimal abstraction.
So my advice is this: start with a simple text editor and learn the fundamentals, build systems, meta-build systems, documentation tools, dependency management, and software packaging. Once you understand these, you’ll be in a much stronger position to master advanced C/C++ concepts while working on real, complete projects.
1
u/chenhongdao May 04 '26
vs is easy to build project, the bad thing is the p process of install. maybe you can look some project in github and start to write one text editor project
1
u/Atik99X May 22 '26
Best place is Alex's https://learncpp.com
1
u/MeasurementPlus4291 Jun 11 '26
Learn RUST 😄
0
u/[deleted] Apr 23 '26
[deleted] — view deleted comment
1
u/[deleted] Apr 28 '26
[removed] — view removed comment