I found out what I like [related to computer coding]

I like hardware and everything that is related to that.I learned some Python3 code and now I want to learn c++ but I don’t know if I will need c to understand everything about pointers.Can you learn c++ if you only know Python3?Is that possible?
I looked at c and I saw that there is a difference between both of them.What are your advices?

It is possible, but Python is a lot easier to learn and use then C++. However, once you know any computer language, learning the next is easier than learning the first one was.

Good luck.

You should focus on getting proficient with Python before moving onto other languages. Python is extremely useful and, as someone else said, easy to learn.

I read in other forums that I should learn C before going to C++.Is that true?Also why do they say that you have to unlearn some things in C to learn C++?

Plenty of people start with C++. But I’d also suggest starting with Python or some other more forgiving language to develop your basic software skills first.

C is a subset of C++.
So, learning C will teach you the basics of the language - the syntax, concepts, and style. But, C++ is object-oriented, while C isn’t. So if you learn to program in C, you will probably develop a “procedural” style of programming, which defeats the purpose of C++. Hence, the warning that you will need to unlearn some things.

FWIW, I have programmed in C for 30+ years. I’ve never learned C++, but it looks like I’m going to have to get more familiar with it, since some of the libraries I am using are in C++.

I would not recommend learning C++. It’s essentially an obsolete language. Critical embedded systems like the Linux kernel and most micro-controller and device driver code actually mostly use C. At most they may use a C++ compiler but the company writing the code will have “house rules” that block using most C++ advanced features. C++ is considered dangerous and it also is a pain to do stuff with it.

C++ is enormously complicated and has many features that are all better in Python.

If you don’t plan to do embedded system work I would recommend learning Cython, which is a tool that allows you to intermix regular Python, Python where you declare the types of some key variables, and C code.

Edited title to be more descriptive.

Well I guess I’ll learn C from your advices.

What do you want to use the language for?
Judging from the resumes I see, Python is the most popular language at universities now, so I agree that it should be learned first. I also agree that you should not learn C before C++. I did - because C++ hadn’t been invented yet - and it makes learning C++ harder. It is much easier to learn non-object oriented languages once you learn object-oriented ones than the other way around. True for me, though I was in a seminar about object oriented languages back when Simula 67 was the only one, and though the language I defined for my dissertation was kind of object oriented.

For college.I need to learn this language for college because it is required in a hardware course.

^^ This.

Unless there’s a specific reason you want to learn C/C++ or you’re just a masochist, both are little-used except in certain, specific industries. They both have a level of “gotcha” that make them difficult to really get good at.

If you want to move on from Python, go for Java or C#.

(For the record, I was a C & C++ coder for ~10ish years, moved on to C# / Javascript for a while. Now I mostly go to meetings.)

I learned Python 3 and not Python.Did you even read my post?

If C++ is the goal, learn C++. Learning C first will essentially cause brain damage. “Unlearning” doesn’t begin to cover it.

In particular, learning about classes is a core skill with incredible benefits.

Note that learning your first language takes a while. Learning your second one is much faster. After a bit you can jump into programming a new language after an evening cram session.

If you learn C++ can you understand pointers?I mean in Python3 I’ve never seen a pointer.Is it hard understanding what a pointer does if you never worked with them?

@ftg Let me give you an example.If you have 0x2cb5a do you convert that to a decimal system?Is that what this example means?

Good for them. Is it for building tools, or for doing embedded systems work or real time programming? I hired people with computer engineering backgrounds, and as I said they all knew Python. C++ is a bit overloaded for hardware applications.
I used a lot of Perl myself but it is antiquated now (even though I love it) so I wouldn’t recommend it.
C started life as a kind of systems implementation language. I used PDP-11s when I was in grad school, and when I saw the first Bell Labs Memo about C I figured it was just a sugared PDP-11 assembler - ++,-- all map into PDP-11 autoinc or autodec.

You don’t really need pointers if you have reasonable data structures. I did a lot of work in C on complex linked list structures. When I moved to Perl, which doesn’t really have pointers, I never missed them.

I worked for a long time in microprocessor design, and I found that very few of the hardware designers knew how to program in any reasonable way, and it hurt them. They were stuck with spreadsheets for analyzing data where a 20 line program could do it much faster and more repeatedly. So learning a language will do you a lot of good.

BTW, what kind of hardware is it? Gate level, board level, system level, architectural level? I got my PhD in computer architecture, but I spent most of my career on EDA for hardware design with close ties to manufacturing.

It’s almost certainly either microcontrollers (freescale, arduinos), which means C and ASM. Or lower level than that, which means VHDL and binary truth trees and so forth.

VHDL or Verilog are not really known as programming languages, though they definitely share characteristics. (I hope they’d teach Verilog since that is what everyone pretty much uses in industry in the US.)
If it does involve microcontrollers, I hope they define the language, since I would hate to have to grade class projects done in umpteen different languages. Not to mention the chance of a student picking the wrong language, like C++, for a microcontroller.
Any interpreted language would be a problem also.