I am just currently getting into programming, and was curious. I know you wouldnt call C an outdated language, but for someone like me, would it be best to learn c++ instead of starting on C? If im correct, C++ is object oriented and C is Structured correct? So if i were to learn C first, i would have to forget a lot to proficiently program in C++?? Please correct me if im wrong and if you have any advice at all for starting out in the programming world i would appreciate it. Thanks!

Dani AI

Generated

Several useful replies above (notably , and ) touched on the relationship between C and C++. This note fills the practical gap: a short decision guide, concrete early topics, common pitfalls, and immediate tooling that makes learning less frustrating for and others starting now.

Decision and early topics: pick a first language by target domain — embedded/systems tends toward C, general application or game work benefits from modern C++. Regardless of choice, early emphasis should be on well-defined behavior, resource ownership, and avoiding undefined actions. Modern C++ idioms (RAII, value semantics, standard containers, smart pointers) reduce footguns compared with manual allocation. Good first exercises are small, self-contained programs that parse input, manipulate simple data structures, and produce deterministic output.

Tooling and practices that speed learning: use a modern standard (-std=c++17 or newer), enable strict warnings (-Wall -Wextra -Wpedantic) and consider treating warnings as errors while learning. Run address/undefined-behavior sanitizers (-fsanitize=address,undefined) and use static analyzers like clang-tidy or cppcheck. Keep builds reproducible with a simple Makefile or a basic project file in an IDE; add unit tests early so regressions are obvious.

Resources and common pitfalls: classic references are K&R for C and Stroustrup / Scott Meyers for modern C++. Use cppreference for up-to-date documentation. Watch for uninitialized variables, buffer overruns, dangling references, iterator invalidation and object-slicing — most early bugs trace to ownership and lifetime mistakes. A practical rule of thumb: prefer standard-library solutions and narrow, well-tested modules; the foundations learned in one language make the other much easier, as observed.

Recommended Answers

All 3 Replies

I am just currently getting into programming, and was curious. I know you wouldnt call C an outdated language, but for someone like me, would it be best to learn c++ instead of starting on C? If im correct, C++ is object oriented and C is Structured correct? So if i were to learn C first, i would have to forget a lot to proficiently program in C++?? Please correct me if im wrong and if you have any advice at all for starting out in the programming world i would appreciate it. Thanks!

Nothing wrong with learning them both at the same time. I don't think learning C makes you "forget" what you learned in C++ at all. C will help you in C++. C is a procedural language and C++ is a hybrid of the procedural and object-oriented paradigms. I would learn them both at the same time.

I don't really think it would make sense to learn one without sort of learning the other. I mean they're mostly the same. When you begin to learn either language, you're going to cover basic flow control - if statements, loops, functions, etc. It's only when you get to classes that the differences start to come up, and I would just go ahead and learn classes. C structs are just classes sine methods. The only other major differences (according to Wikipedia) are the addition of polymorphism (tied in to classes and methods), operator overloading, multiple inheritance, templates, and exception handling.

Agree with what others have said. It might be easier to learn C before tackling c++. If you know fundamentals of C then C++ will be a snap. And if you know C++ C# and Java will also seem quite easy to learn.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.