Thread: Just wondering about this...

  1. #1
    Registered User
    Join Date
    Dec 2003
    Posts
    3

    Just wondering about this...

    Note that there are no graphics, mouse, or sound, in standard C++. (All of these features are compiler and system specific.)
    Someone said this in one of the threads.

    I'm new to C++, just thinking about starting to learn the language.

    Does the quote above mean that with the standard version of C++ (not professional or the higher one, pro over 1,000 dollars), you cant have graphics or sound ?

    or did I misunderstand ?


    Thanks

  2. #2
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    You misunderstood...To get graphics in a program, you have to use a library like DirectX. It contains functions which handle hardware and software specifics, so you don't have to know how to write code for your specific video card or whatever...If you want to make graphics/games, C++ is one of the best languages if you know it well (which will most likely take years )

    And you can make that kind of stuff without paying a dime (assuming you have a decent computer and an internet connection), you just have to invest a lot of time
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Does the quote above mean that with the standard version of C++ (not professional or the higher one, pro over 1,000 dollars), you cant have graphics or sound ?
    You're talking about a line of compilers. The quote was talking about the ISO standard for the C++ language that dictates what is and is not correct/portable C++.
    My best code is written with the delete key.

  4. #4
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    Wink Since that was my quote... My 2 cents...

    Standardization and portability:
    If you write a program using only ANSI/ISO standard C++, you can re-compile it on any C++ compiler, and it will run on any computer (for which you have a C++ compiler.)** There are no special hardware requirements to run a standard C++ program. All that's required is a keyboard, a text display, and disk storage.

    So, although you can't copy the executable (.exe) program, from a PC and run it on a Mac, you can re-compile the source code (.c or .cpp) and make an executable that will run on the Mac.

    All C++ compilers have all of the standard libraries, and will compile standard C++ code.** . Most compilers have additional function libraries in addition to the standard ones. If you use any of these functions, your code may not compile on another compiler. Whenever someone posts a question here like "How do I draw a box?" the first response is "What operating system and compiler are you using?"

    This means that very few (if any) commercial programs are written in pure standard C++. And, that is why most programs are available only for one platform. You can't just re-compile a Windows program for a Mac. You have to re-write all of the GUI, sound, printer output, etc.

    The "normal" way to learn C++, is to learn the standard "part" first. Then you can move-on to system-specific stuff. It usually takes at least several months of studying standard C++, before you start learning how to make your programs "look cool".

    **This is not really true... Most compilers try to be compliant, but most seem to have a few things that don't work correctly.
    Last edited by DougDbug; 12-05-2003 at 03:42 PM.

  5. #5
    Registered User
    Join Date
    Sep 2003
    Posts
    135

    Re: Since that was my quote... My 2 cents...

    Originally posted by DougDbug
    There are no special hardware requirements to run a standard C++ program. All that's required is a keyboard, a text display, and disk storage.
    You say there are no special hardware requirements, then you suggest some items of hardware that are required. None of those are.

  6. #6
    Registered User
    Join Date
    Dec 2003
    Posts
    3
    alright thanks for the explanation.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. switch/case - Just wondering
    By Snip in forum C Programming
    Replies: 3
    Last Post: 05-22-2005, 07:04 AM
  2. wondering about people here
    By moemen ahmed in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 07-08-2002, 09:33 PM
  3. wondering
    By xlordt in forum A Brief History of Cprogramming.com
    Replies: 35
    Last Post: 03-01-2002, 07:05 AM
  4. Just wondering
    By Unregistered in forum Windows Programming
    Replies: 0
    Last Post: 02-13-2002, 12:14 AM