Thread: How C do I need to know to start C++

  1. #16
    Registered User Welder's Avatar
    Join Date
    Oct 2007
    Location
    Washington
    Posts
    100
    Quote Originally Posted by cyberfish View Post
    Also, data structures like vectors and linked lists are only available in C++.
    No kidding? Wow, and I have been using them in C for years and never knew I couldn't!

  2. #17
    Registered User Welder's Avatar
    Join Date
    Oct 2007
    Location
    Washington
    Posts
    100
    Quote Originally Posted by cyberfish View Post
    I have to kindly disagree with Welder. I think C++ is easier with its well-encapsulated libraries. For instance, I think string manipulation (using std::string) in C++ is a lot easier than working with char arrays. I also find iostreams (cin, cout) easier to work with as a beginner than their C counterparts.
    cyberfish, yes and no.

    C++ is more elegant and flows smoother once you get a grasp on it, but what I was getting at is from a beginner's standpoint there is more to the syntax of the language than C. There are more little things that need to be typed and learned to get a program running, more little things like defining classes and such. It can be overwhelming to a green programmer.

    With C you can write functions and little bits of code that a beginner would write, and can do it very easily and not a lot of syntax to remember.

  3. #18
    lfs addicted
    Join Date
    Nov 2007
    Posts
    49
    Quote Originally Posted by Abda92 View Post
    Is there any reason for someone to learn C after C++? and is C++ that much better for a relatively small program (I'm talking about a program ~800 lines).
    I think it has more influence the ability of the programmer (not my case :-) ) over the choise of the language.
    In assembly programming is easier to call and use function from a C library than from a C++ one. If you are wrinting a low level library maybe you want to consider writing in C.

  4. #19
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I recommend C++ simply because of all the tools it provides to help. No handling of memory yourself, and such. Using vectors, maps, string classes, and so on. You can actually focus on the more important tasks in the project.
    While C++ can be a little more complex, you don't need to learn all about classes, inheritance, etc, right away. You can just learn some basic C with C++ traits like classes. One should always start with the easy and then advance to the advanced part.
    At least that's what I believe is best. I've never written a program in pure C.

  5. #20
    Registered User Welder's Avatar
    Join Date
    Oct 2007
    Location
    Washington
    Posts
    100
    Quote Originally Posted by Elysia View Post
    While C++ can be a little more complex, you don't need to learn all about classes, inheritance, etc, right away. You can just learn some basic C with C++ traits like classes.
    So is it safe to say someone should start right in the middle? :P Maybe learn C+ before C or C++? hehe

    Quote Originally Posted by Elysia View Post
    I've never written a program in pure C.
    You haven't lived! C is my baby.

  6. #21
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Welder View Post
    So is it safe to say someone should start right in the middle? :P Maybe learn C+ before C or C++? hehe
    Maybe so!

    Quote Originally Posted by Welder View Post
    You haven't lived! C is my baby.
    I have lived! With C++ and traits of C, I've done all kinds of terrible things that any C++ dev would be horried about if they knew
    Besides that, I have extensively used (and abused) inheritance, multiple inheritance (I think) and polymorphism.

  7. #22
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    No kidding? Wow, and I have been using them in C for years and never knew I couldn't!
    Of course I was referring to their availability in the standard libraries. =)

    I recommend C++ simply because of all the tools it provides to help. No handling of memory yourself, and such. Using vectors, maps, string classes, and so on. You can actually focus on the more important tasks in the project.
    That was what I meant.

  8. #23
    Registered User Bassglider's Avatar
    Join Date
    Nov 2007
    Posts
    32
    this is a great community, I ask one question and get 20 responses! I'm glad to be a part of this. I think the best option for me would be to finish this beginners book and then read the next C book i have to get into more detail. After that I will jump into "C++ Without Fear" as this site recommends. I also just signed up to get a degree in Computer Science even though I have my degree is Business Administration, which isn't really doing it for me.

    Has anyone recieved their Computer Science degree and learned a lot about programming from it; Or is it mostly just for the piece of paper? I have a full time job now which won't interfere much since I can work from home (websites for a media agency) and the classes are mostly online from the university close by.

    Just trying to get an idea of what I can expect on my plate when I get into this program, the classes look exhilarating

    Heres some of the classes I think are interesting:

    Program Structure (3) Program organization paradigms, programming environments, implementation of a module from specifications, the C and C++ programming languages.

    Introduction to Scripting (3) Introduction to scripting languages for the integration of applications and systems. Scripting in operating systems, web pages, server-side application integration, regular expressions, event handling, input validation, selection, repetition, parameter passing, Perl, JavaScript, and PHP

    Machine-Level and Systems Programming (3) Machine organization, machine instructions, addressing modes, assembler language, subroutine linkage, linking to higher-level languages, interface to operating systems, introduction to assemblers, loaders and compilers.

    Programming Language Theory (3) Syntax, control structures, data binding and scope, language styles, programming in LISP and Prolog, language and automata theory
    Logic Design and Microprocessors

    Artificial Intelligence Survey of artificial intelligence: natural language processing, vision and robotics, expert systems. Emphasis on fundamental concepts: search, planning, and problem solving, logic, knowledge representation.

    Concurrent and High-Performance Programming (3) Principles of concurrent and high performance programming. Multi-threading in C and Java for shared-memory programming. Distributed memory programming with Java. Introduction to cluster computing.

    Application Frameworks (3) Experience producing applications with at least two different applications frameworks

    Database Systems (3) Principles of database systems, data modeling, relational models, database design, query languages, query optimization, concurrency control data security

    Software Engineering I (3) System specification, modeling and analysis, prototyping, hierarchal design, program design methods, cost estimation, project management, computer-aided software design. Team-oriented software-design project.

    Sounds cool, but does anyone know from their experience in CS how time is taught working with C/C++?

  9. #24
    Devil™
    Join Date
    Oct 2007
    Location
    IIT-Kharagpur, India
    Posts
    104
    Quote Originally Posted by Bassglider View Post
    Sounds cool, but does anyone know from their experience in CS how time is taught working with C/C++?
    I think your are confused with 'computer science engineer' with 'software engineer' or a 'coder' (whatever you call those ppl who write programs)
    CS is not all about how things are programmed in C or C++ or C# or java or VB etc...
    or not even any one being specific..
    (I dont know exactly why & how, but most CSE ppl prefer C to C++, this is all I found from ppl around me, its just my opinion)
    To be frank these programming languages are used to get the student involved into what & how it is.. but programming is not ALL that a CS grad can do..
    CS just teaches you how things work but NOT how EXACTLY a SPECIFIC thing works. they only teach one as an example leaving you to know about the rest as homework
    In fact there are a lot of things to learn, mostly theoretical relating mathematics & computation.. but only a few are realized/implemented

    so you finally end up knowing how the rest are.. lol

    the bottom line is CS teaches
    SOMETHING of EVERYTHING
    its your interest that teaches your
    EVERYTHING of SOMETHING
    so your question is to yourself what you want to be
    software engg dosent need you to be a CSE grad. but it helps to be one.
    PS: I am studying in CSE final year in some uni @ india
    C's Motto: who cares what it means? I just compile it!!

  10. #25
    Registered User Bassglider's Avatar
    Join Date
    Nov 2007
    Posts
    32
    Ok, thanks, well I knew that CS wouldn't be all about programming. I do wish to learn as much as I can about everything around it.

    When it comes to mathematics is any of it done on paper in your school, or all as computer equations like algebra (or C operator formulas)

  11. #26
    Devil™
    Join Date
    Oct 2007
    Location
    IIT-Kharagpur, India
    Posts
    104
    at this level unfortunately you seldom find any numbers.. lol
    but that is how it is.

    its like the Question will be little different..
    it wont be like "calculate something etc" as in school math
    it will be something like
    • can you at all calculate it?
    • If it can be calculated, can it be calculated in finite time? (i.e: will your algorithm for calculating/doing something ever halt?)
    • if you can calculate in finite time, how hard is it to calculate & how accurate is it?
    • what is the most feasible/preferred way(algorithm)?

    all these are related to algorithms.. where you find only pseudo code. and some proofs..
    they all sound stupid. (at least to me ) but that is what CSE/computation ppl learn.. lol

    as I used 'calculated' above. it need not be the same for everything..
    I dont find anything involving programming or its skills here..
    its like flow of logic..
    Last edited by gibsosmat; 11-08-2007 at 02:24 AM.
    C's Motto: who cares what it means? I just compile it!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  2. Adventures in labyrinth generation.
    By guesst in forum Game Programming
    Replies: 8
    Last Post: 10-12-2008, 01:30 PM
  3. C++ gui for windows where to start
    By prixone in forum Windows Programming
    Replies: 2
    Last Post: 12-16-2006, 11:48 PM
  4. GNOME Desktop won't start (Mandriva)
    By psychopath in forum Tech Board
    Replies: 10
    Last Post: 07-19-2006, 01:21 PM
  5. Start bar color in WinXP
    By confuted in forum Tech Board
    Replies: 4
    Last Post: 05-03-2003, 06:18 AM