Thread: c++ vs c++.net?

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    255

    c++ vs c++.net?

    I have a question...

    now ive begun learning the regular cout c++ and all that but i always had some trouble with some things here and there and just never really got down to figure it all out so i finnally started college in januaray and was shocked to know we were learning c++.net which uses this Console::WriteLine() among other things was just not the same langauge even had a String* variable type that by far was my favorite change to it finnally can make strings easier though dont like the fact .net despises char's but none the less String* is cool/less of a pain in the but to use lol


    now my question is whether this .net or standard c++ is better I mean i can understand .net trying to make unifying things alot easier and all of that but it seems to only have much of a use for windows programming(granted its the mainstream) but what about other things?

    i know games(which id love to make) dont use windows obviously well at least not all of them wouldnt benefit from this and so to me .net just seems like a weird distorted not real version of c/c++

    so i must ask what is the point of this .net business i really dont completely get it i can see its uses but it also has its own downside that doesnt seem that great either?
    hooch

  2. #2
    Registered User
    Join Date
    Sep 2004
    Posts
    197
    actually the C++ standard library includes <string> although I think Microsoft defines its own string type that they use instead, but it may be similar in abstraction.

    The reason character arrays are some what depreciated, is simply because they are dangerous, as they don't have any actual checking to make sure you don't step on toes. with a char array, you can go past the end and contiue, and possibly make changes to data you shouldn't be (buffer overflow any one), at least not that way.
    If any part of my post is incorrect, please correct me.

    This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted.

  3. #3
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    At some point, Microsoft went nuts and started calling everything dot-net. I think they went from Visual C++ 6.0 to Visual C++.Net.

    Actually, for programming it has to do with "managed code" which is compiled to "CLR" (Common Language Run-time). This is something like the Java JIT (Just In Time) compiler. This is all optional. You can use Visual C++.Net to compile to normal .exe files.

    Functions like Console::WriteLine() are part of the Windows API library. These are all of the things in the <windows> or <windows.h> header. The Window API library has always been part of Visual C++. it's not new to .Net. These are in addition to the standard C++ libraries that come with every C++ compiler.

    Most compilers will have some non-standard platform-specific functions/libraries. Most commercial programs include non-standard code. There is no color, no graphics, no sound, no mouse, in standard C++. The downside is that NON-STANDARD CODE IS NOT PORTABLE. You can't simply recompile it for the Mac.

    There's nothing wrong with including non-standard code. But, when you use a library function, you should know if it's standard or not. And, there are times when you'll want to keep the standard non-standard code in different modules (different .cpp files). Your employer might even require it!

    You can find a complete reference to standard C++ at Dinkumware.com. I think CppReference.com is complete too.

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    well my programming teacher i told him i tried to send a .exe file nothing fancy and w/e files needed attached to it to a friend to see if it would run and he couldnt get it to run and he said thats interesting cause he remebered in 6.0 you could do that just fine so i guess the purpose is what purpose does this .net obbession microsoft came up with serve then if its not so easily transferred from one system to another...seems dumb to me if its harder to transfer

    and he didnt really know how to get that to work hes apparently just not now in the last year or two been able to get .net at the school mainly cause the book he uses to teach switched to .net
    (diane zak third edition)

    so i just find it strange they bothered doing this so just curious why they did? seems more of a pain in the butt to me lol
    hooch

  5. #5
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    My guess is that the exe file won't run because you're running a special limited academic version, and it creates special sneaky exe files that won't run unless you have that same version of Visual C++ on the target machine... Just a guess.

    This could also happen if the target system has an older operating system, and you used some function that's not available on the old system. The same thing as if you used some new DirectX 9 function, and the user only has DirectX 8. Of course, that couldn't happen if you'd stick to ANSI/ISO stantard C++.

  6. #6
    Registered User
    Join Date
    Apr 2003
    Posts
    2,663
    When are they going to teach you what a sentence is at that college of yours?

  7. #7
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    well its a tech college dont have to take english if test score is good enough so probably never?

    but as per the subject at hand i must ask then how would i say just as easily like 6.0 carried .exe files over how would you do that in .net?
    hooch

  8. #8
    Registered User
    Join Date
    Sep 2004
    Posts
    197
    Quote Originally Posted by DougDbug
    My guess is that the exe file won't run because you're running a special limited academic version, and it creates special sneaky exe files that won't run unless you have that same version of Visual C++ on the target machine... Just a guess.
    The executables that the compiler makes aren't going to be dependent on the IDE version. Plus, even if it was, you could fix that any how, just download the free compiler only portion of VC++, and tell it to use that instead of the crippled one. I suspect its probably missing a dll or maybe a few of them.
    If any part of my post is incorrect, please correct me.

    This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted.

  9. #9
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    Quote Originally Posted by ssjnamek
    well my programming teacher i told him i tried to send a .exe file nothing fancy and w/e files needed attached to it to a friend to see if it would run and he couldnt get it to run and he said thats interesting cause he remebered in 6.0 you could do that just fine so i guess the purpose is what purpose does this .net obbession microsoft came up with serve then if its not so easily transferred from one system to another...seems dumb to me if its harder to transfer

    and he didnt really know how to get that to work hes apparently just not now in the last year or two been able to get .net at the school mainly cause the book he uses to teach switched to .net
    (diane zak third edition)

    so i just find it strange they bothered doing this so just curious why they did? seems more of a pain in the butt to me lol
    The problem is more than likely your friend did not have the .NET runtime installed.

    Visual C++.NET gives you two choices:
    1) Non-managed, regular C++.
    2) Managed C++ that uses the .NET framework. The .NET framework makes it easier to develop applications, but requires anyone that's running the software to also have the .NET framework installed.

    If your friend wants to run your application he will need to download the .NET framework from here: http://www.microsoft.com/downloads/d...displaylang=en

  10. #10
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    Quote Originally Posted by stovellp
    The problem is more than likely your friend did not have the .NET runtime installed.

    Visual C++.NET gives you two choices:
    1) Non-managed, regular C++.
    2) Managed C++ that uses the .NET framework. The .NET framework makes it easier to develop applications, but requires anyone that's running the software to also have the .NET framework installed.

    If your friend wants to run your application he will need to download the .NET framework from here: http://www.microsoft.com/downloads/d...displaylang=en

    ah thanks for that link we had tried to find it on microsoft.com but failed

    so im guessing what this means is to effectly market and program in .net mainstream you either:
    1. convert to standard c/c++(not sure how but im sure its in there somewhere)
    2.package that download with the program?
    hooch

  11. #11
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    Quote Originally Posted by ssjnamek
    ah thanks for that link we had tried to find it on microsoft.com but failed

    so im guessing what this means is to effectly market and program in .net mainstream you either:
    1. convert to standard c/c++(not sure how but im sure its in there somewhere)
    Yes but if you do this then you wont be "effectly market and program in .net".

    Quote Originally Posted by ssjnamek
    2.package that download with the program?
    You can do this but often it's actually not necessary. I have a feeling .NET is included as part of SP2 and is often downloaded from Windows Update. What a lot of people do is simply say:

    "To use this application you will need to install the Microsoft .NET Framework (link to the download)."

    .NET already comes pre-installed on Windows 2003 and will be in Longhorn and "shorthorn" as well.

  12. #12
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    if that is the case which makes enuff sense wouldnt it seem like a mute point on say game consoles which im somehow doubting use a windows OS much less a windows only programming platform .net?
    hooch

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. migrate from .Net 2.0 to .Net 3.0
    By George2 in forum C# Programming
    Replies: 3
    Last Post: 07-25-2007, 04:07 AM
  2. Some .NET Distribution Stats
    By nickname_changed in forum C# Programming
    Replies: 2
    Last Post: 05-14-2005, 03:41 AM
  3. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM
  4. .net
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 02-15-2002, 01:15 AM
  5. Visual J#
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-08-2001, 02:41 PM