这一段主要是来自于: http://www.microhowto.info/howto/get_the_ip_address_of_a_network_interface_in_c_using_siocgifaddr.htmlSuppose that you wish to display the IPv4 address of a network interface. The variable if_name points to a null-terminated string containing the name of the interface (for...【阅读全文】
在科学应用中,jiffies通常表示各种时间间隔。在linux中jiffies定义如下:extern unsigned long volatile jiffies;jiffies变量总是无符号长整数。因此,在32位体系结构上是32位,在64位体系结构上是64位。对于32位无符号长整数,取值范围为0~0xffffffff(2^32-1=4294967295),如果jiffies到达最大值后还要继续增加的话,它...【阅读全文】
Qt4过渡到Qt5的项目一开始就受阻,记录一下遇到的下面的问题--->编译遇到类似错误:error: QCalendarWidget: No such file or directoryerror: QComboBox: No such file or directoryerror: QDateEdit: No such file or directory解决方案如下:1.在*.pro文件里添加:QT += widgets2.修改#include <QtGui/QCalenda...【阅读全文】
1. no matching funtion for call to 'MyButton::MyButton()' MyButton *button = new MyButton;解决方法:MyButton是新建的类,将mybutton.h中的explicit Mybutton(QWidget *parent);改为explicit Mybutton(QWidget *parent = 0);即可解决问题。...【阅读全文】