Difference Between C++ & Visual C++

This is a discussion on Difference Between C++ & Visual C++ within the C++ Programming forums, part of the General Programming Boards category; I thought that c++ you used to write out the whole program, then you use Visual C++ to make a ...

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    7

    Difference Between C++ & Visual C++

    I thought that c++ you used to write out the whole program, then you use Visual C++ to make a GUI for that program. But I've read you can make programs with Visual C++ alone. I'm new at this, and probally don't know what I'm talking about, but I'm willing to learn.

  2. #2
    Registered User Sake's Avatar
    Join Date
    Jan 2005
    Posts
    89
    C++ is a programming language, Visual C++ is a development environment that happens to support C++ among other things.
    Kampai!

  3. #3
    Registered User
    Join Date
    Dec 2002
    Posts
    56
    Visual C++ is a development environment meaning that it has many of the tools necessary for a programmer to get the job done, including a debugger, code editor, and project manager just to name a few.

    C++ is a programming language. You provide a C++ compiler with instructions and it will then turn it into an executable.

    Visual C++ includes a C++ compiler, but also, as I stated before, many other tools that a programmer can use.

  4. #4
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    Hi,

    I thought that c++ you used to write out the whole program, then you use Visual C++ to make a GUI for that program.
    Yes, that's essentially correct. Visual C++ programs use a pre-existing complex structure of classes that is programmed with the C++ language, and it's purpose is to provide an easier way to build GUI's than starting from scratch yourself. Visual C++ programs are also known as 'windows programs' because they use windows as GUI's. As a result, Visual C++ programs have a much different structure than standard C++ programs.

    As the posters above mentioned, Visual C++ is also the name of MS's compiler in which you compile/execute C++ programs. It provides a bunch of programing tools like auto completion, text highlighting, etc. that make writing programs easier. The compiler can be used to program C++ programs as well as Visual C++ programs.

    I have a "Visual C++" programming book, and I can assure anyone that it is not a book about how MS programmed their Visual C++ compiler. Instead, the first half of the book teaches you standard C++ programming, and the second half of the book teaches you how to do 'windows programming' with C++, which involves windows based GUI's. You have to know standard C++ to be able to do 'windows programming' with C++, and my book clearly considers the term 'Visual C++' to be equivalent to 'windows programming with C++''. In addition, I have never heard anyone on a forum refer to a standard C++ program as a "Visual C++" program just because it happened to be compiled with an MS Visual C++ compiler.

    You can also do windows programming with other languages like Visual Basic, which uses a different language--Basic--and a different compiler--Visual Basic 6. Visual Basic is considered "RAD": Rapid Application Development for it's ease of use and quicker development times.

    Maybe an example would make things clearer. Suppose you want the user of your program to be able to click on a button, and then two dice roll, and finally a picture of the dice with the number's on them is displayed. You might use the MS Visual C++ 6 compiler to create the 'windows program' that consists of a window with the button and the picture of the dice, as well as some text. Then, you would write the C++ code that creates two random numbers between 1-6, and then selects the correct image name from an array of image names corresponding to the dice numbers. That code would be attached to the GUI using the features found in the Visual C++ compiler, so that when the user clicked on the button, your C++ code would execute and the window would display a random dice image. All of the C++ code, which would include the code for the windows GUI and the dice calculations would be in one program. The whole program would be considered a 'C++ windows program' or a "Visual C++ program."

    I hope that helps. I remember having the same problem figuring out the difference myself.
    Last edited by 7stud; 01-31-2005 at 07:24 AM.

  5. #5
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    my book clearly considers the term 'Visual C++' to be equivalent to 'windows programming with C++''
    I really disagree here. 'Visual C++' is the editor, compiler and tools package, and is nothing more.

    Visual C++ programs use a pre-existing complex structure of classes that is programmed with the C++ language
    Because of the previous point, I have to disagree here as well. What you are likely referring to is MFC (Microsoft Foundation Classes), which is a complex structure of pre-existing C++ code that comes bundled with Microsoft Visual C++.

    You might use the MS Visual C++ 6 compiler to create the 'windows program' that consists of a window with the button and the picture of the dice, as well as some text
    You'd might use the resource editor (a tool bundled with Microsoft Visual C++) to create a separate file that describes the window you want created, and then plug that into your C++ program. Otherwise, you can create the window using C++ code without bothering with the resource editor.

    That code would be attached to the GUI using the features found in the Visual C++ compiler, so that when the user clicked on the button, your C++ code would execute
    Windows programs can be made with any compiler made for the Windows platform; it's simply a matter of obtaining the Windows Platform SDK so that you'll be able to use the functions needed to create Windows applications.

    The difference between Visual C++ and C++ is that Visual C++ is what you use to program in C++, and C++ is the language itself. And Windows applications are different from standard C++, because standard C++ does not include built-in support for Windows; but Windows programs written with C++ are still C++ programs, even if they use non-standard libraries provided by Microsoft.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Templates and Macros plus more...
    By Monkeymagic in forum C++ Programming
    Replies: 8
    Last Post: 01-20-2007, 05:53 PM
  2. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 11:03 AM
  3. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 09:57 AM
  4. Replies: 3
    Last Post: 07-08-2004, 12:55 AM
  5. header file bringing errors?
    By bluehead in forum Windows Programming
    Replies: 4
    Last Post: 08-19-2003, 01:51 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21