Quote:
Originally Posted by Dr.Toni
There is a difference...
C# is like VB and the other .net languages... They are leant to the English language....
C++ uses mostly symbols for that...
As example:
C++:
Code:
#include <iostream>
#include <ostream> // You don't need it since C++11
int main()
{
std::cout << "Hello World!" << std::endl;
}
VB:
Code:
Sub Main()
MsgBox "Hello World!"
End Sub
C#:
Code:
using System;
// A "Hello World!" program in C#
namespace HelloWorld
{
class Hello
{
static void Main()
{
System.Console.WriteLine("Hello World!");
}
}
}
You see the difference now?!
|
bullshit.
He is using CLI/C++ so
Code:
#include "stdafx.h"
using namespace System;
int main(array<System::String ^> ^args)
{
Console::WriteLine("cpp");
return 0;
}
C#
Code:
using System;
namespace myapp
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("cs");
}
}
}
VB
Code:
Module myapp
Sub Main()
Console.WriteLine("vb")
End Sub
End Module
It's so hard :-)