⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 client.cc

📁 MICO2.3.13 corba 环境平台
💻 CC
字号:
#include "InterOpTest.h"#ifdef HAVE_UNISTD_H#include <unistd.h>#endif#ifdef _WIN32#include <direct.h>#endifusing namespace std;intmain (int argc, char *argv[]){  CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);  /*   * IOR is in hello.ref in the local directory   */  char pwd[256], uri[300];  sprintf (uri, "file://%s/ref", getcwd(pwd, 256));  cout << "geting Johnson reference..." << flush;  CORBA::Object_var obj = orb->string_to_object(uri);  InterOpTest::Johnson_var johnson = InterOpTest::Johnson::_narrow(obj);  if (CORBA::is_nil(johnson)) {      cout << "failed!" << endl;      cout << "oops: could not locate Johnson server" << endl;      exit(1);  }  cout << "done." << endl;  CORBA::String_var result;  result = johnson->say_hello("Hello from MICO CSIv2 interoperability test!");  cout << "result: `" << result.in() << "'" << endl;  return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -