Thread: C++ Or C++.NET

  1. #16
    Registered User
    Join Date
    Apr 2005
    Posts
    41
    .net is merely an environment. It is managed coding. A lot of featurers have been automated for you, especially windows programming. The logic is the same for c++ and .net. Syntactically c++ and C++.net vary a bit here and there. For instance in .net coding you do not include iostream.
    Code:
    //C++
    cout<<"Hello";
    
    //C++.net
    
    Console::WriteLine(S"Hello")
    
    //C++
    
    int n;
    cout<<"Input N: "; cin>>n;
    cout<<n;
    
    //C++.net
    
    int  n;
    Console::Write(S"Input N: ") //Reads a string;
    n=Int32::Parse(Console::ReadLine()); //Parse =string to int
    Console::WriteLine(S"{0}", n.ToString() ); //Convert int to string {0} spacing
    
    //C++
    int a[10];
    int b[2] [3];
    
    //C++.net
    
    //Manged code allows for the compiler to do garbage collection
    
    Int32 a[] = new Int32 [10]; 
    Int32 b[,] = new Int32[2,3];
    These are just few of the basic differences. The real value of .net comes in windows programming.

  2. #17
    Registered User
    Join Date
    Apr 2003
    Posts
    2,663
    Naaah. Btw, the above posts, talking about subsets and supersets mean nothing to the VB Programmer. >.< Give me a few weeks, and I'll know I guess
    Nope. You probably won't encounter the terms "subset" or "superset" in any C++ book. They are mathematical terms which are sometimes used in everyday language.

    If you have a group of things(called "a set" in mathematics) like this:

    apple, banana, strawberry

    then a smaller group of things:

    apple, strawberry

    which is completely contained in the first group is called a subset of the first group. A larger group of things like:

    apple, banana, strawberry, orange, pear

    which completely contains a smaller group is a superset of the smaller group. In other words, a subset is a portion of a group, and a superset is a group with some things added to it.
    Last edited by 7stud; 06-16-2005 at 05:14 PM.

  3. #18
    Registered User
    Join Date
    Jun 2004
    Posts
    722
    Quote Originally Posted by 7stud
    C++ is the Ferrari of computer languages.
    nice

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