当前位置:编程学习 > C#/ASP.NET >>

新手 hello world


#include "stdafx.h"

using namespace System;

int main(array<System::String ^> ^args)
{
    Console::WriteLine(L"Hello World");
String^ str;
str ="aaa";
  Console::WriteLine(str);
  
Get^ g = gcnew Get();   


    return 0;
}

ref class Get
{
public : static String^ G()
 {
return "vvv";
 }
};


提示 没有修饰符,加上public: 后 提示前端需要; --------------------编程问答-------------------- 代码是 C++/CLI --------------------编程问答-------------------- --------------------编程问答-------------------- 我晕,以为看到了C++和Delphi的合体

不懂,帮顶 --------------------编程问答-------------------- 这个HELLO WORLD太给力,完全看不懂 --------------------编程问答-------------------- C++/CLI --------------------编程问答-------------------- 先定义,后使用。把类定义写在函数前面。 --------------------编程问答-------------------- 类 写在main前面试试   --------------------编程问答--------------------

看不懂。。 --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- 这让大家如何是好。。 --------------------编程问答-------------------- 弱弱的问一句:哪个String ^是个什么东东? --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- 先定义,后使用。把类定义写在函数前面。
也可以在main前面加上
class Get; --------------------编程问答-------------------- 引用类 等于没用。。。。。

先定义,后使用.
--------------------编程问答-------------------- 先定义,后使用。
把类定义写在函数前面。
也可以在main前面加上
class Get; --------------------编程问答-------------------- 这里面居然还有比我更菜的   我表示很惊讶 --------------------编程问答-------------------- 这是啥呀 --------------------编程问答-------------------- --------------------编程问答-------------------- 你这个 hello world 不够 hello啊 --------------------编程问答-------------------- 托管版本的 C++ --------------------编程问答-------------------- 看的不是很懂…… --------------------编程问答-------------------- 我只用纯C++不知道你在写什么 好神奇
补充:.NET技术 ,  VC.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,