Page 4 of 4 FirstFirst ... 234
Results 31 to 32 of 32

Thread: Java, C ++, or other language?

  1. #31
    Ninja Code Monkey
    Join Date
    Nov 2001
    Location
    Washington State
    Posts
    1,027
    c++ is a superset of c, so of course you can do everything in c++ that you can in c. In my experience, people going from c to c++ have alot of problems writing clean code because they can't do the paradigm switch from structured programming to object oriented. They also tend to use alot of c style code which is frowned upon in c++ (excessive void pointers, excessive pointer use, overuse of the preprocessor, global variables, etc), which can cause alot of problems.
    "When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
    "There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
    "Mischief my ass, you are an unethical moron." - chsh
    Blog of X

  2. #32
    Junior Member
    Join Date
    Aug 2004
    Posts
    11
    Well, C++ inherited a good deal of the C syntax wich includes all of the operators, and that means that technically an instruction like cout << 1 would be acceptable in C syntax, the difference is that the C++ iostream library overrides the << operator so it behaves differently in C++ for ostream objects, however, if you don't include the iostream library, cout << will do exactly the same thing both in C and C++ and will complain about the exact same type errors.

    I still think it's a mistake to consider C and C++ to be similar just because they share a few syntax aspects. That would be sort of saying that Java is similar to C as well. I actually think Java is just about as similar to C as C++ is (except, for the language name ). In fact, you don't even have to move from C to C++ or Java to notice how much a paradigm change can affect programming, if you program C in unix and then program C in windows, it'll seem like you're programming in a totally different language even though you're using the same C language, reason? the paradigm.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •