Author Topic: C or C++?  (Read 4690 times)

0 Members and 1 Guest are viewing this topic.

Offline Dysko

  • 29
    • GolfVictorSpotting.it
Today I finally completed my C course at university, and since I liked it, I'm interested in learning more about programming.

The course I took taught me the basics of C (variables, types and typedef, strings, functions, pointers, arrays, switches, structs), but I also read somewhere that C++ is better than C.

Should I continue learning C, or should I start learning C++? And where can I find good tutorials?
My aircraft spotting website: GolfVictorSpotting.it

 

Offline Ghostavo

  • 210
  • Let it be glue!
    • Skype
    • Steam
    • Twitter
C++ is basically C with objects. So if you want to dabble with OOP it might be interesting for you to learn C++. Otherwise, it's a waste of time and you'll do well to continue perfecting your knowledge of "pure" C.
"Closing the Box" - a campaign in the making :nervous:

Shrike is a dirty dirty admin, he's the destroyer of souls... oh god, let it be glue...

 

Offline Topgun

  • 210
c++ is easier to program in than c if  you are working in a team. otherwise it depends on your way of thinking, OO or procedural.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
No, C++ generally includes STL...which I don't really like, but is a whole lot different because it introduces the concepts of vectors, iterators, and so on.

C++ is not "better" than C. There is no hierarchical ranking of programming languages. They have strengths and weaknesses.

But you probably won't want to code much with assembly.
-C

 

Offline blackhole

  • Still not over the rainbow
  • 29
  • Destiny can suck it
    • Black Sphere Studios
STL vectors rock.

 
C is a little faster, C++ better for complex programms (better maintainability)
Going from C to C++ is a little harder as going from C++ to C, as you can still write "c-style code" in c++, not really learning the OOP.
You cant wrtite c++ style code in c, however-

 

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
And good luck programming a robot with an 8051 microcontroller with C++.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Topgun

  • 210
that's when you would use java.


 :nervous:

 

Offline blackhole

  • Still not over the rainbow
  • 29
  • Destiny can suck it
    • Black Sphere Studios
that's when you would use java.

RUN FOR YOUR LIIIIIIIIVES!

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
try
{
     
RUN FOR YOUR LIIIIIIIIVES!
}
catch(java.lang.Exception.RunnerException rexc)
{
     rexc.getRunner().rehabilitate();
}
-C

 

Offline blackhole

  • Still not over the rainbow
  • 29
  • Destiny can suck it
    • Black Sphere Studios
try
{
     
RUN FOR YOUR LIIIIIIIIVES!
}
catch(java.lang.Exception.RunnerException rexc)
{
     rexc.getRunner().rehabilitate();
}
finally
{
  fail_miserably();
}

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
you.getAbility(Person.JAVA_CAPITALIZATION).setFael(true);
return lulz;

:p
-C

 

Offline blackhole

  • Still not over the rainbow
  • 29
  • Destiny can suck it
    • Black Sphere Studios
stab(Forum->getMember("WMCoolmon"));

 

Offline Flipside

  • əp!sd!l£
  • 212
if getStabStatus()
{
Forum.Hammer(hardlight);
}

:P

 

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
...
catch(Hammer $h)
{
  $sql = "SELECT DISTINCT memberid FROM posts WHERE topic='54939'";

  $result = $myDatabase->query($sql);

  while($row = $myDatabase->moveNext($result))
  {
    if(getUsername($row->memberid) != "chief1983")
    {
      bootToTheHead($row->memberid);
    }
  }
  echo "im in ur thredz bootin ur hedz";
}
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Flipside

  • əp!sd!l£
  • 212
:lol: Oh noes! Boot To The Head!

Dim pwned = New Beam(Forum.getMember(Chief1983));

...

 

Offline Stormkeeper

  • Interviewer Extraordinaire
  • 211
  • Boomz!
if(NewBeam(Forum.getMember(Chief1983)))
do
{

    int i = 1;
    i ++;
 
    if(i == 0)
    {
        i = 1;
     }
    
    Supernova(Forum.getMember(Flipside));

    if(i > 9000)
    {
         cout<<"ITS OVER NINE THOUSAND!!!!1111!!"<<endl;

     }
}while(i != 0);
Ancient-Shivan War|Interview Board

Member of the Scooby Doo Fanclub. And we're not talking a cartoon dog here people!!

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
  • 142857
I think this thread has served its purpose. :p