📄 findpns.c
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -