#include<iostream> #include "common.h" #include<string> #include <ctype.h> #include "Calendar.h" #include <iostream> #include<boost/date_time.hpp> #include <boost/lexical_cast.hpp> using namespace boost::posix_time; using namespace boost::gregorian; using namespace std; struct tagPerson { string name; int age; }Person; void ChangeContentBySP(tagPerson *person); int main(int argc) { boost::shared_ptr<tagPerson> myPerson(new tagPerson()); myPerson->name = "ganquanfu"; myPerson->age = 29; ChangeContentBySP(myPerson.get()); cout << myPerson->name << " " << myPerson->age << endl; //输出000000000 28 int wait; cin >> wait; return 0; } void ChangeContentBySP(tagPerson *person) { person->name = "000000000"; person->age = 28; }
转载于:https://www.cnblogs.com/ganquanfu2008/p/3202310.html