Thread: things i am curious about in C++

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    17

    things i am curious about in C++

    i am a beginner C++ programmer and i have a couple question about C++. Firstly what are the advantages for use C++,over java and c.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by mdennis10
    Firstly what are the advantages for use C++,over java and c.
    I think you should ask what are the advantages of searching the Web and then asking for clarification if needed over just posing a question with no attempt to find out answers for yourself. For example: Java Vs Cpp. Furthermore, your question is more about language comparison than about C++. Do you also know Java and C? If not, many of the concepts and ideas that might be raised in an answer to your question may well be meaningless to you.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Apr 2011
    Posts
    17
    i actually did but i wanted a professional advice from somebody that actually use the language

  4. #4
    Registered User
    Join Date
    Apr 2011
    Posts
    17
    Quote Originally Posted by laserlight View Post
    I think you should ask what are the advantages of searching the Web and then asking for clarification if needed over just posing a question with no attempt to find out answers for yourself. For example: Java Vs Cpp. Furthermore, your question is more about language comparison than about C++. Do you also know Java and C? If not, many of the concepts and ideas that might be raised in an answer to your question may well be meaningless to you.
    i actually did but i wanted a professional advice from somebody that actually use the language

  5. #5
    Registered User
    Join Date
    Apr 2011
    Posts
    17
    would it be beneficial to make c++ my primarily language or would it be better if i invested time learning another language

  6. #6
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Nobody here knows. You should know as many languages as possible in order to meet the demands of the software industry, though. You only meet purists on the internet.

  7. #7
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by mdennis10
    i actually did but i wanted a professional advice from somebody that actually use the language
    My professional advice is: learn what you would like to learn, program what you would like to program, have fun! The advantages and disadvantages of a programming language vis-a-vis another programming language does not matter when you are a student/hobbyist setting out to learn a programming language since there are no business requirements to consider: no job => no best tool for the job. (Okay, advantages in ease of learning does matter for a person's first programming language, but with good material to learn from it is not a terribly big issue.)

    Quote Originally Posted by mdennis10
    would it be beneficial to make c++ my primarily language or would it be better if i invested time learning another language
    It would be beneficial to make a widely used natural language such as English your primary language.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  8. #8
    Registered User
    Join Date
    Apr 2006
    Posts
    2,149
    C++ is more modern and powerful than C. C++ allows two programming paradigms that C does not: object oriented programming and generic programming. OOP is the aggregation of related information and functions to facilitate an intuitive program model. Generic programming is the aggregation of similar tasks that could be done to any kind of data.

    C++ is more powerful than Java. C++ largely has the same high level capabilities to java, but also allows extremely low level control for bottle neck performance situations. C++ also has an extensive capability for metaprogramming, which briefly described is the ability to write a program that writes a program. This extra level of indirection can be useful in some cases.

    Java has a number of advantages over C++ however. It's simpler, because it lacks pointers, which is a rather involved concept from C/C++, and employs garbage collection. It also has a massive standard library with networking and graphical interface. C++ does have the same capabilities as Java in this regard, but there is less standardization, which means there's no one common library that everyone uses.

    C's only advantage over C++ is that it's simpler. However, C, not C++, is the de-facto language for embedded programming.

    As a first language I would always recommended Java over either of the other two, because it's modern and has a faster learning curve. However, of all languages, I recommend Python.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    It is almost as if you are implying that C++ isn't a modern language, King Mir, even though I understand what you mean.
    Also consider that C++ has a modern feature which all other "modern languages" seemingly lacks: deterministic destruction and RAII.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by Elysia View Post
    It is almost as if you are implying that C++ isn't a modern language, King Mir, even though I understand what you mean.
    Also consider that C++ has a modern feature which all other "modern languages" seemingly lacks: deterministic destruction and RAII.
    I often work in C# in recent months, and I find it somewhat annoying that you can't explicitly destroy an object (aside from those that implement IDisposeable of course), or expect it to be destroyed implicitly when it goes out of scope.

  11. #11
    Registered User
    Join Date
    Apr 2006
    Posts
    2,149
    Quote Originally Posted by Elysia View Post
    It is almost as if you are implying that C++ isn't a modern language, King Mir, even though I understand what you mean.
    Also consider that C++ has a modern feature which all other "modern languages" seemingly lacks: deterministic destruction and RAII.
    I C was not modern. C++ is.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. jus curious
    By Obelisk in forum C Programming
    Replies: 3
    Last Post: 10-06-2009, 02:30 AM
  2. Just curious
    By Chaplin27 in forum C++ Programming
    Replies: 3
    Last Post: 09-10-2004, 10:57 AM
  3. Just curious
    By afreedboy in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 01-21-2004, 11:10 PM
  4. Just curious
    By CAP in forum C Programming
    Replies: 9
    Last Post: 09-08-2002, 05:15 PM
  5. Just Curious!?!
    By JLTaylor in forum C Programming
    Replies: 3
    Last Post: 02-18-2002, 09:17 AM