📄 gpnamedetect.cpp
字号:
#include "db.h"
#include <iostream>
#include <fstream>
#include <time.h>
#include <string.h>
//#include<string>
using namespace std;
int main()
{
while(1)
{
DB db=DB("121.15.171.69","stock","hello","stock");
string sql;
if(db.connect("GBK"))
cout<<"Connet is ok"<<endl;
else
{
exit(1);
cout<<"false"<<endl;
}
sql="insert into stock_info(code) values('cwb13000')";
if(db.update(sql))
cout<<"OK insaert"<<endl;
db.close();
cout<<"the program is sleeping now "<<endl;
exit(1);
//sleep(10800);
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -