问个很弱智的C#的问题在某个Visual Studio .Net的教材上看到了这样的Hello World的Code,但是在VC6里死活也不能compile.请问是为什么?难道只有VS.Net才可以?谢了
using System;
class Welcome
{
static void Main()
{
Console.WriteLine("Please Enter Your Name:");
string name = Console.ReadLine();
Console.WriteLine("Welcome to you, {0}!", name);
}
}
DEBUG:
error C2873: 'System' : symbol cannot be used in a using-declaration
fatal error C1004: unexpected end of file found[小希 (9-30 15:53, Long long ago)]
[ 传统版 |
sForum ][登录后回复]1楼
some basic understandingyou are attempting to use the class libraries("System" namespace) provided by the .NET framework.
The .NET framework is not provided for Visual C++ 6.
Hence, the code fails.
Note: Visual Studio.NET is an IDE to develop .NET applications. Without it, you can still leverage on all aspects of the .NET framework .[SmellsLikeTeenSpirit (9-30 18:18, Long long ago)]
[ 传统版 |
sForum ][登录后回复]2楼
这是C#的代码怎么可以放到VC++里编译呢
.NET平台的C#和Visual Studio 6.0的VC++6完全不是一个概念啊[bigfox (9-30 21:53, Long long ago)]
[ 传统版 |
sForum ][登录后回复]3楼