findpns.c

来自「mico_example_siegel c源代码」· C语言 代码 · 共 26 行

C
26
字号
#include <fstream.h>//#include <iostream.h>#include "FindPNS.h"PseudoNameService_ptr FindPNS(CORBA::ORB_ptr orb){   char refstring[1000]; //  cout << " Perform open PNS.dat file ...." << endl;    ifstream is("PNS.dat");  // cout << " Already try to open filr PNS.dat " << endl;    if (is) {//      is.get(refstring,1023);   is >> refstring;   is.close();   //   cout << " The name reference is : "<<refstring << endl;       PseudoNameService_ptr pns = PseudoNameService::_narrow(orb->string_to_object(refstring)); //   cout << " Find a PNS using find function... " << endl;       return pns;   }   else {      cerr << "Error finding pseudo nameservice reference" << endl; //    cout << " Don't Find a PNS using find function... " << endl;       return PseudoNameService::_nil();   }}

⌨️ 快捷键说明

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