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

  1. #16
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    @bludstayne:

    we must be using different API's

    according the code I am looking at, Robc is declared as such:

    CProgger *Robc = new CProgger;
    My Website

    "Circular logic is good because it is."

  2. #17
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by DavidP
    @bludstayne:

    we must be using different API's

    according the code I am looking at, Robc is declared as such:

    CProgger *Robc = new CProgger;
    stop cutting and pasting copyrighted code... this is how it's done:
    Code:
    class CProgger
    {
         public:
               ...
               int GetReputation();
               void IncrementReputation();
               bool SetReputation(int);
         private:
              ...
              int reputation;
    };
    you see, the setreputation is better because it returns 'true' if the reputation was successively changed... it looks something like this:

    Code:
    bool CProgger::setReputation(int NewReputation)
    {
         long int OrigReputation=reputation;
         long int OrigNewReputation=NewReputation
         reputation=NewReputation;
         if(reputation==NewReputation && (reputation-Origreputation!=0) && OrigNewReputation==reputation)
               return true;
         return false;
    }
    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

  3. #18
    1479
    Join Date
    Aug 2003
    Posts
    253
    Quote Originally Posted by gandalf_bar
    . There is democracy in this forum, right?!!!!
    Haha, one day you will learn that there is never a democracy in any forum. The thing is, if people like you, you can get away with breaking the laws. If people do not know you what you say can and will get you banned. Democracy....pfft! Thats a whole different topic in itself.
    Knowledge is power and I want it all

    -0RealityFusion0-

  4. #19
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    Quote Originally Posted by RealityFusion
    Haha, one day you will learn that there is never a democracy in any forum. The thing is, if people like you, you can get away with breaking the laws. If people do not know you what you say can and will get you banned. Democracy....pfft! Thats a whole different topic in itself.
    Dude your gonna get banned for telling people about that
    Woop?

  5. #20
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    [sarcasm]Wouldn't he get a fair and speedy trial by a jury of his peers?[/sarcasm]

  6. #21
    Useless Apprentice ryan_germain's Avatar
    Join Date
    Jun 2004
    Posts
    76
    I learned C, then Java, then C++

    I think its a good way of going because i think C is simple, then learn OOP, then when you learn C++ you can realize how powerful C++ is. Of course the drawback in my opinion is that its a little harder to learn

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