pans
2017-01-04 0bad0e6b94c566f63bb97661850899f679fd1d12
RtspFace/demo/src/db/main.cpp
@@ -1,4 +1,3 @@
#include <string>
#include <iostream>
@@ -10,8 +9,16 @@
int main(int argc, char *argv[])
{
   int i=2;
   DBuntil dbu = DBuntil();
   person p={};
   my_db mydb={"root","Basic@2017","localhost","demo",3306};
   DBuntil dbu = DBuntil(mydb);
   person p={0,"test"};
   if(dbu.db_register(i,&p)){
      cout<<"add succeed"<<endl;
   }else
      cout<<"add false"<<endl;
   p={};
   p = dbu.db_rearch(i);
   if(p.p_id != NULL)
   {
@@ -19,5 +26,6 @@
      cout<<p.name<<endl;
   }else
      cout<<"person is null"<<endl;
   return 0;
}
}