Thread: Difference between C++ and VC++?

  1. #16
    The larch
    Join Date
    May 2006
    Posts
    3,573
    It seems that there is indeed a mix-up of two (or more) completely different languages. When people talk about MSVC's extensions to the C++ language, I suppose they mean things where it differs from the letter of the language specification. For example, rvalues binding to non-const references:

    Code:
    void foo(int& i);
    
    int main()
    {
        foo(10); //compiles with VC++ as an extension
    };
    C++ compiles to native code. Period.
    Are you quite sure in it. A language specification describes what various language constructs do. However, does it specify what it compiles to?
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  2. #17
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by anon View Post
    Are you quite sure in it. A language specification describes what various language constructs do. However, does it specify what it compiles to?
    If you want to be pedantic, then no. But in an effort to separate the confusion of these two languages, let's say it does.
    This holds true for Windows and Linux, at the very least.
    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.

  3. #18
    Registered User
    Join Date
    Mar 2010
    Posts
    8
    Hmm, I think things have become much more confusing than they should be!

    I originally wanted to learn a language to write games. I had heard C++ was best for this as it's more powerful - however, I then heard and read that actually, VC++ (the compiler that I'm using), compiles to only MSIL - so any benefits are lost. Although I have been told by people here that VC++ can indeed compile down to machine code, so I'm completely confused! I had also heard that the VC++ compiler will accept commands that aren't in the C++ language - again this has been refuted by people here.

    I would like to learn programming: a language in which I can write games. I need to start somewhere that teaches me good habits and practices, but can build me up to writing a game...
    Last edited by #include Jack; 03-28-2010 at 03:36 PM.

  4. #19
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by #include Jack View Post
    I originally wanted to learn a language to write games. I had heard C++ was best for this as it's more powerful - however, I then heard and read that actually, VC++ (the compiler that I'm using), compiles to only MSIL - so any benefits are lost. Although I have been told by people here that VC++ can indeed compile down to machine code, so I'm completely confused! I had also heard that the VC++ compiler will accept commands that aren't in the C++ language - again this has been refuted by people here.
    Let me break it down:
    - There are two languages: C++ (native) and C++/CLI (MSIL).
    - Visual Studio supports both languages.
    - What language you use can be chosen by a setting, a switch (C++ is default).
    - All C++ compilers usually have some C++ extensions, akin to anon showed (nothing to do with C++/CLI).

    I would like to learn programming: a language in which I can write games. I need to start somewhere that teaches me good habits and practices, but can build me up to writing a game...
    You want to make a game. Choose C++ first (NOT C++/CLI). In Visual Studio, use the wizard to create a new Win32 project. Keep your file endings as .cpp (default). Program away your game.
    Visual Studio will automatically compile your code into a native executable.
    Now all you have to do is learn game programming.

    Questions?
    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.

  5. #20
    Registered User
    Join Date
    Mar 2010
    Location
    Oklahoma City, OK USA
    Posts
    6
    #include Jack, I am new here as well, as much as I know and am following the totorials on this website I have concluded that C++ is the language to learn for programing as it will continue to evolve.

    You should download Code:Blocks like instructed on this website, follow the instructions in the totorials using Code:Blocks and not something else.

    Now I am sure Microsoft Visual Studio 2010 Ultimate would be a very nice thing to have but it costs $12,000
    to buy one of there other limited versions would be a waist of money.
    Visual Studio Products - 2010 Ultimate, Premium & Professional - Microsoft Visual Studio

    Code:Blocks is free and good to learn on, Microsoft Visual Studio 2010 products will not allow you learn what is needed to convert your visions of software to code.

    Code:Blocks__It would be like teaching a child multipication and showing them how multipication actually works so thy can use it in any fashion they want, and implement it to construction, farming, check book balancing.

    Microsoft Visual Studio 2010 Ultimate__This would be like trying to teach a child mathimatic short cuts eg. multiples of 11 to make him APEAR to be more mathematically inteligent than his own math teacher, and getting the answer to any multiple of 11 faster than anyone else is able to, but in reallity he is slower and dumber than them all, he will eventually come to a math problem that he is unable to solve because he does not know how math works...eg...

    13 x 11 = 143 // 1 + 3 = 4 put the 4 in between the 1 and the 3
    72 x 11 = 792 // 7 + 2 = 9 put the 9 in between the 7 and the 2
    78 x 11 = 858 // 7 + 8 =15 put the 5 in the midle and carry the 1 to add to 7 ( 7 + 1 = 8 )

    Now if you were to teach math secrets like above to someone that already knows how to do math the hard way on paper, this will now ENHANCE his ability and dramatically increase his speed thus actually making him superior to others.

    If you learn a different programing language it will be a mistake, learn C++ first and use Code:Blocks, learn at your own pace, so that you dont miss NOTHING at all. Then later on buy Microsoft Visual Studio 2010 and go out there and woop some asses.

    Code:Blocks is the way to go for a beginner.
    Last edited by Rct. Tsoul; 03-28-2010 at 03:54 PM.

  6. #21
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Rct. Tsoul View Post
    #include Jack, I am new here as well, as much as I know and am following the totorials on this website I have concluded that C++ is the language to learn for programing as it will continue to evolve.
    Any language will continue to evolve, just so you know.

    You should download Code:Blocks like instructed on this website, follow the instructions in the totorials using Code:Blocks and not something else.
    This is nonsense. You are to use whatever you want.

    Now I am sure Microsoft Visual Studio 2010 Ultimate would be a very nice thing to have but it costs $12,000
    to buy one of there other limited versions would be a waist of money.
    Visual Studio Products - 2010 Ultimate, Premium & Professional - Microsoft Visual Studio
    There's also a free edition: The Express edition. The professional edition is also free to students and the Team System is available for those who have MSDNAA.

    Code:Blocks is free and good to learn on, Microsoft Visual Studio 2010 products will not allow you learn what is needed to convert your visions of software to code.

    Code:Blocks__It would be like teaching a child multipication and showing them how multipication actually works so thy can use it in any fashion they want, and implement it to construction, farming, check book balancing.

    Microsoft Visual Studio 2010 Ultimate__This would be like trying to teach a child mathimatic short cuts eg. multiples of 11 to make him APEAR to be more mathematically inteligent than his own math teacher, and getting the answer to any multiple of 11 faster than anyone else is able to, but in reallity he is slower and dumber than them all, he will eventually come to a math problem that he is unable to solve because he does not know how math works...eg...

    13 x 11 = 143 // 1 + 3 = 4 put the 4 in between the 1 and the 3
    72 x 11 = 792 // 7 + 2 = 9 put the 9 in between the 7 and the 2
    78 x 11 = 858 // 7 + 8 =15 put the 5 in the midle and carry the 1 to add to 7 ( 7 + 1 = 8

    Now if you were to teach math secrets like above to someone that already knows how to do math the hard way on paper, this will now ENHANCE his ability and dramatically increase his speed thus actually making him superior to others.

    If you learn a different programing language it will be a mistake, learn C++ first and use Code:Blocks, learn at your own pace, so that you dont miss NOTHING at all. Then later on buy Microsoft Visual Studio 2010 and go out there and woop some asses.

    Code:Blocks is the way to go for a beginner.
    What do you base these facts on?
    I am tempted to say this is rubbish, but I am open to why you think this way.
    Code::Blocks and Visual Studio are two different IDEs and nothing else. They have nothing to do with the language.
    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.

  7. #22
    Registered User
    Join Date
    Mar 2010
    Location
    Oklahoma City, OK USA
    Posts
    6
    If you remeber learning in school as a child, you need to learn HOW IT WORKS not just how to do it. Yea you can teach a child how to do math and then show him how to use a calculator to do his homework. The child needs to first memorize how to add & subtract 1 - 10 and also explain 0 is nothing, that will help him later when you teach multipication. They need to first learn how to count using there fingers, 3 fingers and 4 fingers, now count them, they will then see they have 7 fingers, AND THEY WILL KNOW IT IS CORRECT because they can see it for themself as real as life.

    As you can see above my spelling and grammer sucks, and still to this day it sucks, back in 1987 Radio Shack had a electronic dictionary and spell checker for $145, I jump all over that and did not hesitate to buy it, I only was thinking about how much time it would save me doing homework not having to look up definitions in a dictionary and right down the definition of that word on paper to turn in, now all I did was type it into the electronic dictionary and then just copy it to paper, now I cant spell above a 3 grade level because I failed to learn the way they told me to, I did it my own way, now I am dependant on spell & grammer checkers, THAT IS why you are picking on me now, just looking how I right in these posts and you know I am just typing it JUST THE WAY IT SOUNDS you know my edjucation level is lower than yours, and yes I am sure it is, but I can say that math is second nature to me thus making these totorials very usefull for learning, and by using Code:Blocks I can follow the totorials and later on the books step by step because the totorials assume you installed Code:Block, and installed it into C:\Program Files\CodeBlocks
    Last edited by Rct. Tsoul; 03-28-2010 at 04:48 PM.

  8. #23
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I understand that part, but I fail to see how this relates to Visual Studio vs Code::Blocks.
    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.

  9. #24
    Registered User
    Join Date
    Mar 2010
    Posts
    8
    Ahh, thank you. That's cleared up a lot.

    In terms of native and MSIL C++ - other than one compiling down to machine code and the other not - are there any other differences? Be it syntax or otherwise. Also, what is the difference between the win32 project and console application? (I've been using the console application so far).


    Thanks

  10. #25
    Registered User
    Join Date
    Mar 2010
    Location
    Oklahoma City, OK USA
    Posts
    6
    Quote Originally Posted by Elysia View Post
    I understand that part, but I fail to see how this relates to Visual Studio vs Code::Blocks.
    You cant follow a totorial for Code:Blocks using Microsoft Visual Studio 2010, first because the writer of the totorials assumes you are using Code:Blocks, installation folder should be as specified in the install totorial, NOT A DIFFERENT FOLDER.
    C:\Program Files\CodeBlocks

    I dont have Microsoft Visual Studio 2010, but I am positive that you cannot use its totorials using Code:Blocks eg....
    Take a photograph of the 3D object you want in your program, then import and paste.

    I do intend to buy Microsoft Visual Studio 2010 Ultimate, I wont need a DEV team, I can then make what ever I want for Windows, even an entire game within a mater of about 6 week, maybe less, and still have time to goto work, and make a living. The following level below took me 6 weeks and it not even finished on only 1 level using the crap SDK released for the game, Visual Studio is not just a C++ editor, it is like having a team of MIT graduates skilled in everything doing what you say, 3D modeling and animation and texturing, export capability, I am sure something like what I made below would only take a few hours at most on Visual Studio, I was sick and taking time off work is what even allowed me the time to do it in the first place.
    http://www.youtube.com/watch?v=vrMyC...layer_embedded
    Last edited by Rct. Tsoul; 03-28-2010 at 06:23 PM. Reason: adding more stuff

  11. #26
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    You are very clearly insane, a troll, and a liar.

    I have to ask, where did you escape from?

    I'm only afraid you may be somewhere near my state.

    Soma

  12. #27
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    I've got to say, Microsoft's marketing department truly deserves a standing ovation.

    Soma

  13. #28
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by #include Jack View Post
    Ahh, thank you. That's cleared up a lot.

    In terms of native and MSIL C++ - other than one compiling down to machine code and the other not - are there any other differences? Be it syntax or otherwise. Also, what is the difference between the win32 project and console application? (I've been using the console application so far).


    Thanks
    The MSIL, eg C++/CLI, is a .NET language. It can access Microsoft's .NET Framework (along with specific new syntax for the entire CLI features), and basically, that's it. Use it if you want to able to use the .NET Framework and C++ (ie interop).
    The difference between the win32 project and console application is the black console window. It won't appear if you select a win32 project.

    Quote Originally Posted by Rct. Tsoul View Post
    You cant follow a totorial for Code:Blocks using Microsoft Visual Studio 2010, first because the writer of the totorials assumes you are using Code:Blocks, installation folder should be as specified in the install totorial, NOT A DIFFERENT FOLDER.
    C:\Program Files\CodeBlocks

    I dont have Microsoft Visual Studio 2010, but I am positive that you cannot use its totorials using Code:Blocks eg....
    Take a photograph of the 3D object you want in your program, then import and paste.
    What says you cannot use Visual Studio tutorials?
    For that matter, the IDE has nothing to do with the language. You can follow just any language tutorial without worries.
    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.

  14. #29
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    Quote Originally Posted by Elysia View Post
    If you want to be pedantic, then no. But in an effort to separate the confusion of these two languages, let's say it does.
    This holds true for Windows and Linux, at the very least.
    No, it doesn't. It holds true for most if not all of the major compilers existing for both platforms.
    It's quite feasible (and probably has been done) for example to write a C++ compiler that runs on Windows and Linux and output Java classfiles (or whatever, say an XBox or Wii).

  15. #30
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Rct. Tsoul View Post
    in reallity he is slower and dumber than them all, he will eventually come to a math problem that he is unable to solve because he does not know how math works...eg...

    Now if you were to teach math secrets like above to someone that already knows how to do math the hard way on paper, this will now ENHANCE his ability and dramatically increase his speed thus actually making him superior to others.

    If you learn a different programing language it will be a mistake, learn C++ first and use Code:Blocks, learn at your own pace, so that you dont miss NOTHING at all. Then later on buy Microsoft Visual Studio 2010 and go out there and woop some asses.
    That's crazy. You are still using an IDE to manage the compiler for you. What's the difference? If you really want to "miss nothing" and "learn to do it on paper", don't use an IDE at all (a lot of people, inc. beginners, do not). You use a text editor and a command line compiler. You don't need anything else.

    If you are already happy with Code::Blocks of course stick with it, but why you would believe anyone is going to learn more about "the real process" that way I dunno.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Tags for this Thread