上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 60 下一页

2016年11月15日

Linux execve函数簇用法

摘要: exec函数簇实现的功能都是用一个新程序替换原来的程序,替换的内容包括堆栈段,代码段,进程控制器PCD,但是原进程的PID保持不变 int execl(const char *path, const char *arg, ...); ...表示参数是可变参数列表,例如execl("hello","参数1","参数2","参数3",NULL) #include #include #in... 阅读全文

posted @ 2016-11-15 22:23 寒魔影 阅读(1097) 评论(0) 推荐(0)

Linux Linux下特殊的printf函数和fputs函数

摘要: Linux下printf()和fputs()函数必须以'\n'结尾才会打印在终端上 阅读全文

posted @ 2016-11-15 11:19 寒魔影 阅读(715) 评论(0) 推荐(0)

2016年11月14日

Linux 进程详解

摘要: Linux内核的七大区间 1.进程管理(进程创建,进程的三种状态,进程间的调度,调度算法...) 2.内存管理(段式管理(Linux所有段都从0开始),页式管理--地址偏移量) 3.系统调用(C语言库函数的区别) 4.网络协议(TCP/IP协议) 5.UFS--虚拟文件系统==》Linux驱动总线模型 6.驱动管理(网络设备,块设备,字符设备...) 7ARCH(对各个硬件平台的支持...RAM... 阅读全文

posted @ 2016-11-14 20:52 寒魔影 阅读(578) 评论(0) 推荐(0)

C语言 malloc()与sizeof运算的盲点

摘要: //malloc()与sizeof运算的盲点 #include #include #include void main() { char *p = (char *)malloc(sizeof(char)*100); printf("%d\n",siezof(p));//打印4 /* malloc函数分配的内存,使用memset()函数的时候要注意, ... 阅读全文

posted @ 2016-11-14 19:52 寒魔影 阅读(597) 评论(0) 推荐(1)

2016年11月13日

QT 数据库编程四

摘要: //vmysql.cpp #include "vmysql.h" #include Vmysql::Vmysql() { mysql_init(&mysql1); connection=NULL; memset(errorbuf,0,sizeof(errorbuf)); } Vmysql::~Vmysql() { } /*连接数据库*/ int Vmysql::... 阅读全文

posted @ 2016-11-13 17:02 寒魔影 阅读(349) 评论(0) 推荐(0)

QT 数据库编程三

摘要: //mainwindow.cpp #include "mainwindow.h" #include "logindlg.h" #include "scriptdlg.h" #include #include #include #include #include MainWindow::MainWindow(QWidget *parent) : QMainWindow(pa... 阅读全文

posted @ 2016-11-13 17:01 寒魔影 阅读(1072) 评论(0) 推荐(0)

QT 数据库编程二

摘要: //logindlg.cpp #include "logindlg.h" #include #include #include loginDlg::loginDlg(QWidget *parent) : QDialog(parent) { /*默认没有点击登录*/ islogin=false; this->setWindowTitle(tr("登录"... 阅读全文

posted @ 2016-11-13 16:58 寒魔影 阅读(362) 评论(0) 推荐(0)

2016年11月12日

QT 数据库编程一

摘要: QT如果要进行网络编程首先需要在.pro中添加如下代码:QT += network //logindlg.h #ifndef LOGINDLG_H #define LOGINDLG_H #include #include #include #include class loginDlg : public QDialog { Q_OBJECT public: ex... 阅读全文

posted @ 2016-11-12 16:04 寒魔影 阅读(1029) 评论(0) 推荐(0)

2016年11月9日

数据库 数据库编程二

摘要: //头文件 #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif //设置退格键不回显 int set_Backkey(); //获取用户SQL语句,判断用户操作,不区分大小写 void read_user_print(MYSQL... 阅读全文

posted @ 2016-11-09 23:16 寒魔影 阅读(323) 评论(0) 推荐(0)

2016年11月8日

Linux 退格键不回显

摘要: 在程序使用system("stty erase ^H");可以实现在输入状态下,按退格键删除字符,不回显。 调用tcsetattr修改linux基本输入的控制字符定义 //Linux下退格键不回显 #include #include #include #include #include #include int main(int arg,char *args[]) { ... 阅读全文

posted @ 2016-11-08 22:20 寒魔影 阅读(1314) 评论(0) 推荐(0)

上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 60 下一页

导航