Thread: Programming question.

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    142

    Programming question.

    I'm still new to this so i'm still trying to grasp the full scope of c++ programming,

    but with c++ being a supset of c does this mean that any C++ programmer utilises both c and C++ functions?

    i have been working with c++ only but it seems that alot of the things i need like working with strings and
    file I/O are in c.

    Cheers
    WhAtHA hell Is GoInG ON

  2. #2
    Registered User
    Join Date
    May 2003
    Posts
    1,619
    Yes and no.

    C++ provides its own library functions which are superior to C in the areas you mentioned (e.g. fstream should be preferred over FILE, std::string should be preferred over char * strings, etc.)

    On the other hand, there are times when C functions may be useful.
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

  3. #3
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    C++ is designed ti have a backwards compatability with C. It has made important changes, eliminating some of the practices C teaches you that are in C++ considered poor.
    Double Helix STL

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Not everything in the C runtime library has a replacement in C++'s own library, which is part of the reason why C++ includes the whole C runtime. rand(), for example, didn't have an equivalent until very recently.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM