test.cpp
来自「Visual_C++.NET实用编程百例」· C++ 代码 · 共 28 行
CPP
28 行
// 这是使用应用程序向导生成的 VC++
// 应用程序项目的主项目文件。
#include "stdafx.h"
#include "localhost.h"
#using <mscorlib.dll>
using namespace System;
int _tmain()
{
// TODO: 请用您自己的代码替换下面的示例代码。
Console::WriteLine(S"下面是调用Web服务");
localhost::atlSrvWebService* ps=new localhost::atlSrvWebService();
char name[50];
Console::Write(S"请输入您的姓名:");
gets(name);
String *str=ps->HelloWorld (name);
Console::WriteLine("{0}",str);
double dnum;
Console::Write(S"请输入一个数:");
scanf("%lf",&dnum);
double dresult=ps->MyMethod (dnum);
Console::WriteLine ("{0}的平方是{1}",__box(dnum),__box(dresult));
scanf("%lf",&dnum);
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?