1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

I am interested in C/C++

Discussion in 'Programming & Webmastering' started by gopal, Sep 22, 2012.

?

Do you think i can learn C/C++?

  1. You have the talent to learn it!

    10.0%
  2. Yes, you can

    40.0%
  3. Maybe, not sure

    25.0%
  4. You? With C/C++ I think the sun is going to rise from west tomorrow(No never)

    25.0%
  1. AphexDreamer

    AphexDreamer

    Joined:
    Jun 17, 2007
    Messages:
    7,078 (2.74/day)
    Thanks Received:
    912
    Location:
    C:\Program Files (x86)\Aphexdreamer\
    You've just got to start programming as much as you can.

    Start thinking about how you can take real world problems and turn it into a program and try coding that, main thing being you want to code.

    Practice makes perfect.
  2. Vinska

    Vinska

    Joined:
    Jul 23, 2011
    Messages:
    1,382 (1.27/day)
    Thanks Received:
    1,188
    Location:
    Kaunas, Lithuania
    Every time someone refers to C and C++ as some singe entity, or worse - do so by using "C/C++" God kills a kitten.
    ...And someone programmer almost breaks his/her glasses due to a facapalming reflex.
    Seriously, Don't do it. Please.
    C and C++ are way too different to be refered as such.
    Thank You.

    Back on topic: If You do have the patience to learn C and/or C++, or better yet - master one or both, I'd say - go for it. Not only it will teach You programming, but also a lot of other skills that will probably be very useful overall. Even in things not even related to computers. Not to mention it greatly develops logical thinking and discipline. A tripple Win! :)
    Crunching for Team TPU
  3. Chevalr1c

    Chevalr1c

    Joined:
    Sep 3, 2010
    Messages:
    3,129 (2.22/day)
    Thanks Received:
    1,337
    ^^ Even I (someone with no more programming experience than some basics in Pascal/Delphi, a long time ago) understand that C and C++ are different. C is differently oriented while also being of a lower level than C++ (am I right about that?).
    Crunching for Team TPU
  4. eidairaman1

    eidairaman1

    Joined:
    Jul 2, 2007
    Messages:
    11,959 (4.65/day)
    Thanks Received:
    1,337
    C++ is originally an Evolution of C.
    Chevalr1c says thanks.
  5. eidairaman1

    eidairaman1

    Joined:
    Jul 2, 2007
    Messages:
    11,959 (4.65/day)
    Thanks Received:
    1,337
    It takes patience for this kind of programming language.

    Staying away from Drugs? Yes

    Staying away from Gothic Women? No- have as much fun as you can

  6. Aleksander

    Joined:
    Dec 2, 2009
    Messages:
    3,254 (1.93/day)
    Thanks Received:
    304
    Why goth girls?
    What about girls? (without any type like goth)
  7. Jimmy6

    Jimmy6

    Joined:
    Nov 12, 2013
    Messages:
    74 (0.30/day)
    Thanks Received:
    2
    You got the right idea there and the thinking now just write the source code and compile it. You won't learn anything if someone does it for you. If you really need it perhaps there's source code for the same idea online for download.
  8. OnePostWonder

    Joined:
    Dec 27, 2008
    Messages:
    579 (0.29/day)
    Thanks Received:
    107
    I'm just gonna throw this out there.

    You do realize you're suggesting someone do something they were trying to do over a year ago.
    Mindweaver says thanks.
  9. Blue-Knight

    Blue-Knight

    Joined:
    Dec 9, 2013
    Messages:
    332 (1.53/day)
    Thanks Received:
    47
    I wouldn't recommend C/C++ to anyone. But "Yes, you can" learn it.

    It all depends on your will to learn and/or dedication.
  10. BiggieShady

    BiggieShady

    Joined:
    Feb 8, 2012
    Messages:
    929 (1.05/day)
    Thanks Received:
    305
    Location:
    Zagreb, Croatia
    This is how to learn C++ in 21 days:
    [​IMG]
    ... but seriously, just get to day 697 and you'll be good enough to contribute.
    Mindweaver and silentbogo say thanks.
  11. Blue-Knight

    Blue-Knight

    Joined:
    Dec 9, 2013
    Messages:
    332 (1.53/day)
    Thanks Received:
    47
    I disagree. In my opinion, every beginner should start with the lower level language possible (e.g.: Assembly, using an assembler and not programming bit by bit).

    Why? High level programming languages are too "complex" and hides the fundamental basics of how a program really works. And even complicates simple things (often)...

    Why? I started with a high level programming language and after I met Assembly, I wished I could start with it because I really learned how the things work with it. And after I met Assembly I could understand and learn higher level languages a LOT better and easier.

    That's my opinion!
  12. Frick

    Frick Fishfaced Nincompoop

    Joined:
    Feb 27, 2006
    Messages:
    10,387 (3.39/day)
    Thanks Received:
    2,087
    C is pretty low to begin with. Assembly is probably fine, but these days I think it's a bit too abstract (if by abstract you mean hard to understand). You obviously need it sometimes, but if you just want to program as a hobby and dabble with electronics C is pretty good I think.
  13. Blue-Knight

    Blue-Knight

    Joined:
    Dec 9, 2013
    Messages:
    332 (1.53/day)
    Thanks Received:
    47
    Compared to raw Assembly it is pretty high, especially pointers and arrays (for example).

    Not to mention the "if, else, and, or" and other operators that make multiple/complex comparisons much faster than if coded in raw Assembly.
    Last edited: Feb 7, 2014
  14. MustSeeMelons

    Joined:
    Jan 13, 2014
    Messages:
    96 (0.52/day)
    Thanks Received:
    16
    Location:
    Riga
    I started programming in Pascal, then went to C, then to C++, then Java. Pascal was good to learn the core basics, although it's more or less useless practically. I'd say, don't start low-level, rather go high and then down. To be honest, Java could be a good starting point, it can be very high level, but you can easily get the basics out and when you are ready, go down to C++ to really understand what that 'new' operator is, what's a memory leak etc. Low level can be a bot too broad to grasp, but that's just me :)
  15. Blue-Knight

    Blue-Knight

    Joined:
    Dec 9, 2013
    Messages:
    332 (1.53/day)
    Thanks Received:
    47
    You must be kidding or you do not know Pascal enough. The "Free Pascal Compiler" is simply great and very complex/advanced.

    As a "Free Pascal" user I can say it is a VERY POWERFUL compiler and you won't feel the absence of C or other high level languages with it (as I did). Anyway, for other specific things that can't be done in Pascal (or any other high level language), Assembly is there for you.

    But for general programming, it is much more than enough.
  16. MustSeeMelons

    Joined:
    Jan 13, 2014
    Messages:
    96 (0.52/day)
    Thanks Received:
    16
    Location:
    Riga
    The thing with Pascal is that - it's old. (Is there a user friendly IDE?) True, I've almost completely forgotten Pascal - Java is my daily driver and C++ is my tinkering language.
  17. Blue-Knight

    Blue-Knight

    Joined:
    Dec 9, 2013
    Messages:
    332 (1.53/day)
    Thanks Received:
    47
    C is old, many other languages are old.

    The thing is: Some of them are old but they are still in constant and active development, they continue to improve each year and support newer architectures/technologies and being old and under constant development is a very good thing actually. If they were old and development was abandoned they would be considered obsolete already (which didn't happen).
  18. Wrigleyvillain

    Wrigleyvillain PTFO or GTFO

    Joined:
    Oct 13, 2007
    Messages:
    7,644 (3.10/day)
    Thanks Received:
    1,763
    Location:
    Chicago
    Check out edX and Coursera. Free actual college courses from the institutions themselves and an excellent structured environment in which to give it a real shot. And if you can't keep up you will at least now know what you need to concentrate more on. For me it's math when it comes to things like this (tried Python).
  19. Aquinus

    Aquinus Resident Wat-man

    Joined:
    Jan 28, 2012
    Messages:
    5,892 (6.55/day)
    Thanks Received:
    1,890
    Location:
    Concord, NH
    I feel the opposite. Most modern high-level languages will handle a lot of things for you. Not that doing a little bit of assembly didn't help me, but I wouldn't say it helped me with much development I did down the road. You can bash it, but Java isn't a bad a place to start. If you're thinking scripting languages, python and ruby aren't bad. You should learn a language that is good at doing whatever you want to be doing. If you're going to be writing drivers or anything that runs at the OS/driver level, then maybe assembly will help understand how you can save a few clock cycles by doing things a particular way in C.

    I've been using Clojure recently and I've been enjoying it a lot because it does just about everything I want it to do very well. Granted, it's not you're typical procedural programming language. It is a dialect of LISP, so be prepared to change how you think about data.
  20. BiggieShady

    BiggieShady

    Joined:
    Feb 8, 2012
    Messages:
    929 (1.05/day)
    Thanks Received:
    305
    Location:
    Zagreb, Croatia
    Frick is right on this one. Compared to assembly, it is not much higher.
    Pointers in C simply cannot be different than pointers in assembly, because pointer is a address of a variable and assembly works directly with memory addresses and registers (variables in asm are symbolic). Arrays work the same as in c (offset to memory address of first element) only c has operator [ ].
    Flow control instructions (if,else) are not operators. Boolean expressions used within flow control instructions use boolean operators (and, or, ...).
    Coding in raw assembly is done by directly embedding asm code in c code and it is done only for some parts of critical sections where compiler cannot be instructed with a flag how to behave properly.
  21. Blue-Knight

    Blue-Knight

    Joined:
    Dec 9, 2013
    Messages:
    332 (1.53/day)
    Thanks Received:
    47
    I was telling the way it is accessed in code, which is pretty different. And yes, compared to raw assembly it is pretty high level (a fact).

    And construction of complex/multiple/nested comparisons in C or other high level language can be done in seconds while in raw assembly will cost you minutes to hours, depending on complexity. And other thing is about data structures, high level languages such as C make access and organization a lot faster.

    This is not even close to assembly level, please.
    MxPhenom 216 says thanks.
  22. BiggieShady

    BiggieShady

    Joined:
    Feb 8, 2012
    Messages:
    929 (1.05/day)
    Thanks Received:
    305
    Location:
    Zagreb, Croatia
    Of course C is a high level language ... is it as low as you can go with high level languages? Yes.

    Does anyone write comparisons in asm? No. Data stucturs in asm? No, they use C. Asm get embeded in c code for some parts of a critical section. Just as I already said.

    My point? Compilers are so great that you don't magically gain speed simply by doing everything in raw assembler, optimizing using powers of a human brain.

    EDIT:

    Actually I misread this
    as this
    so we are kind of making a same point
    Last edited: Feb 7, 2014
  23. Blue-Knight

    Blue-Knight

    Joined:
    Dec 9, 2013
    Messages:
    332 (1.53/day)
    Thanks Received:
    47
    Yes, me! Not while using a high level language but when coding a program or specific function in assembly (using an assembler).

    As I do not work professionally in this field I can choose any tool/language that I need/want. And that's what makes me happy! :D

    Of course, coding an entire program in Assembly for competition is out of question nowadays... Not impossible, but you know time is money.

    Happy New Year!
  24. BiggieShady

    BiggieShady

    Joined:
    Feb 8, 2012
    Messages:
    929 (1.05/day)
    Thanks Received:
    305
    Location:
    Zagreb, Croatia
    lulz, happy new year to you too

    Imagine what would it be like ... managing call stack manually and saving registers every time you call a function ... I'd go insane ... I mean more insane
  25. Aquinus

    Aquinus Resident Wat-man

    Joined:
    Jan 28, 2012
    Messages:
    5,892 (6.55/day)
    Thanks Received:
    1,890
    Location:
    Concord, NH
    A number of CPUs have instructions that handle pushing the state of the registers to the stack and popping them off when you call and return from a sub-routine. When you start writing the application you need to define where in memory the stack begins, but beyond that, the CPU handles a number of things like that at the hardware level. It depends on the architecture though. A good example is if the stack pointer isn't in the same place when you return from the sub-routine as when you started it, you'll be in trouble, also if you alter deeper contents of the stack.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page