Thread: You have to learn C in order to learn C++

  1. #1
    Registered User gandalf_bar's Avatar
    Join Date
    Oct 2003
    Posts
    92

    You have to learn C in order to learn C++

    This is my thought. I learned programming language first by learning C. Ok, it is hell. So I am looking better alternatives. I am poisoned by someone who said that C++ is the best. So I learned C++. I thought it is the best programming language ever made. I make a lot of time invesment there. I hope learning C++ avoid me from nifty grifty C. Then somehow I realize in order to be advance in C++ you have to learn C. I realized it when I make frontend for commandline program. I have to deal with the da_mn fork, shared memory, and other he_ll things like semaphore, etc. They all are in C. So, grrrr.

    I try to look another language. But it took a lot of time to master. So I just wonder is there anybody here in this forum that mastering C++ without learning C in depth.

    Right now I am learning Java. Learning Java is much easier than C++. And the documentation is very good. You want to learn about thread, go java.sun.com, you want to learn about blablabla, go to java.sun.com. All is centralized. It is different with C++. The documentation is cluttered around the world.

    So because I have put a lot of invesment in C++, it is not wise to dump C++ after I become advanced in Java. I will use them both. After all I have some projects written in C++.

    But if I can travel back to past, maybe I will make decision not to learn C++. Maybe I stick to much easier programming language such as python, java, or c#.

    So when I read the FAQ in this website, "You don't have to learn C to learn C++."
    Big lie, friends!!!!

    Any thought, friends?!!!!
    A man asked, "Who are you?"
    Buddha answered, "I am awaked."

  2. #2
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    Wow... this is like the blind leading the blind.

    Yes, C has forks, memory calls, and semaphores.

    I really don't think that C and C++ are all that different and I'd think that if you can pick up C++, learning C would not be that big of a leap. I started with C and I personally find that to be easier than C++. And I'd definately take C over Java anyday.

    And you can definately learn C++ without learning C. The same principles lie under both languages, so learning one without the other is somewhat stupid to say in reality, but to say that you CAN'T learn one without the other is just silly.

  3. #3
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    echo ober.

    and also the reason Java's documentation is all centralized is because Sun owns Java. Most computer languages in this world are not owned by a single company, like Java is, so you better get used to not having centralized documentation. C# and Java are among the few that do.

    C++ and C are managed by standards committees, as are most computer programming languages.

    If you want good documentation on C or C++:

    http://www.cplusplus.com/ref/#libs
    http://www.cppreference.com/
    http://www.sgi.com/tech/stl/

    The 2nd link covers the widest amount and most information. The 1st is good, but not as extensive as the 2nd link. The 3rd covers just the C++ STL.
    My Website

    "Circular logic is good because it is."

  4. #4
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    I prefer www.cplusplus.com for iostream questions and I think they cover it better than www.cppreference.com

    I learned C first and am now learning C++. I don't think its any harder to learn than C. Its just a matter of changing how you view things.

  5. #5
    Caffienated jinx's Avatar
    Join Date
    Oct 2001
    Posts
    234
    I went from BASIC / batch to C++ then picked up C# and C then Fortran and python just for kicks. I'm currently learning assembly just because.

    If you want to learn THE basics, start with basic. Its like a coloring sheet at Denny's with a broken crayon, though. But once you can stay inside the lines, you're pretty much set.
    Weeel, itss aboot tieme wee goo back too Canada, eeehy boyss.

  6. #6
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    Every c++ book I've ever read said it's harder to learn c++ if you already know c. Usualy it's stated in the prologue.
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  7. #7
    Compulsive Liar Robc's Avatar
    Join Date
    Jul 2004
    Posts
    149
    >Any thought, friends?!!!!
    My thought is that you're hiding a whiney rant behind a vague request for comments. You don't like C? That's fine, plenty of people don't like it. So don't use it. You spent a lot of time learning C++ and regret it? That's fine too, clearly you missed the part where you gained valuable programming experience that can be transfered between languages. You think Java is better than sliced bread? Good for you, the Java advocacy newsgroup would love to hear from you.

    As for whether to learn C before C++ or not, no one can say for sure because everyone learns differently. The best remedy for that is to do as much research as possible before putting a lot of time into learning something that you may not want to.

  8. #8
    unleashed alphaoide's Avatar
    Join Date
    Sep 2003
    Posts
    696
    personal experience, I started off straight with C++ with no previous exposure to any other programming languages before and have had no significant difficulty.
    source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense

  9. #9
    Compulsive Liar Robc's Avatar
    Join Date
    Jul 2004
    Posts
    149
    >I started off straight with C++ with no previous exposure to any other programming languages before and have had no significant difficulty.
    Cool. I started with C++ too, but I was too confused and not interested enough to do more than just past the "Hello, world!" program. Several years later I took up C and fell in love. Then shortly after I discovered the joy of C++ and started really learning that too. So I'm one of the people who did C and then C++, and had no trouble at all making the logical jump. But I still like C better.

  10. #10
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    My thought is that you're hiding a whiney rant behind a vague request for comments. You don't like C? That's fine, plenty of people don't like it. So don't use it. You spent a lot of time learning C++ and regret it? That's fine too, clearly you missed the part where you gained valuable programming experience that can be transfered between languages. You think Java is better than sliced bread? Good for you, the Java advocacy newsgroup would love to hear from you.
    I couldnt have said it any better myself, Robc.

    Robc->Repuation++;
    My Website

    "Circular logic is good because it is."

  11. #11
    Registered User gandalf_bar's Avatar
    Join Date
    Oct 2003
    Posts
    92
    Ok, guyz....! I m just sharing my pain. I think I have a right to do it. Of couse, you have rights to say I m silly, to doom me, to think me stupid, to curse me. There is democracy in this forum, right?!!!!

    About document scattered around the world?
    I m getting used to.....

    For Robc:
    Hey, I dont say Java is superior than C++. Just because I say learning Java is much easier that doesnt mean it is better than C++. For some situation, C++ is still my best armor although it is hard. Maybe I need years more to appreciate the power of C++. My mariage with C++ is just almost two years. About doing as much research as possible before putting a lot of time into learning something that you may not want to as you told me? All I can say to err is human.....

    For C+++C_forever:
    I don't know. I cann't express with words. I just feel learning java is much easier. But maybe that happen because I have experience in C++ before.

    But I am still standing with my point:
    You can avoid learning C if you want to learn C++ in order to get A mark. But to be advanced in C++, somehow, somewhere, sometime, got you!!! you have to learn C.
    A man asked, "Who are you?"
    Buddha answered, "I am awaked."

  12. #12
    Quote Originally Posted by DavidP
    I couldnt have said it any better myself, Robc.

    Robc->Repuation++;
    Clearly you are mistaken. Robc is not a pointer. I think what you're looking for is more along the lines of: "Robc.Reputation++;". Of course, if you are using C#, then clearly you haven't read the documentation, and are therefore a moron and don't need to make another post on this message board as long as you live.

    Also, Reputation is a protected variable. You have to use the member function called IncrementReputation(). So in the end, it would look like this:
    Code:
    Robc.IncrementReputation();
    You could also use the SetReputation() function that was introduced in version 2.0 of Robc. It's called like this:
    Code:
    Robc.SetReputation(Robc.GetReputation());
    The only drawback is the GetReputation() is considered depreciated, and it's no longer recommend for use. Honestly, I have no clue why they even introduced the SetReputation() function, it's just a hassle to use.

  13. #13
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Well, you certainly can't avoid learning a good deal of C syntax, as C++ and C share a very large (and self contained) subset. One of the big differences between the two, though, is programming ideology. You don't write a C++ program as you would a C program. To do so would lose a lot of what makes up C++'s strengths in relation to C. (Note: Don't misread what I've said, I'm not claiming C++ is superior to C, rather that it is different; it is it's own language.)

  14. #14
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    Ok, guyz....! I m just sharing my pain. I think I have a right to do it. Of couse, you have rights to say I m silly, to doom me, to think me stupid, to curse me. There is democracy in this forum, right?!!!!
    No. We live in fear of our dark master, the forum rules. And the webmaster's pretty powerful too, but he doesn't speak much.

  15. #15
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    ...maybe because C++ is merely an extension of C? here's a quick history lesson: C++ started out as <hint>C-with-classes</hint>
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Warnings about initializer order
    By CodeMonkey in forum C++ Programming
    Replies: 5
    Last Post: 06-18-2009, 07:55 PM
  2. Can you actually learn c++ in 21 days?
    By Raeliean in forum C++ Programming
    Replies: 14
    Last Post: 07-27-2005, 03:41 PM
  3. Novice trying to learn C++
    By dead in forum C++ Programming
    Replies: 10
    Last Post: 12-01-2003, 09:25 PM
  4. Trying to learn guitar
    By Ben_Robotics in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 07-10-2003, 03:15 AM
  5. Advice on how to being to learn C++
    By VenomUK in forum C++ Programming
    Replies: 9
    Last Post: 05-18-2002, 01:06 PM