
学习笔记
chensen8631
热爱编程,爱学习,能吃苦,求上进
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
学习QT第一天笔记
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); this->setGeomet原创 2014-11-24 22:37:22 · 463 阅读 · 0 评论 -
在C++ 程序中调用被C 编译器编译后的函数,为什么要加extern “C”?----转
首先,作为extern是C/C++语言中表明函数和全局变量作用范围(可见性)的关键字,该关键字告诉编译器,其声明的函数和变量可以在本模块或其它模块中使用。 通常,在模块的头文件中对本模块提供给其它模块引用的函数和全局变量以关键字extern声明。例如,如果模块B欲引用该模块A中定义的全局变量和函数时只需包含模块A的头文件即可。这样,模块B中调用模块A中的函数时,在编译阶段,模块B虽然转载 2015-01-08 22:09:03 · 302 阅读 · 0 评论 -
C++怎样将文件指针指向文件的首部和
#include #include #include using namespace std; int main(void) { ifstream in; ofstream out; out.open("tmp.txt"); in.open("hello.txt"); string buf; int count = 0; while (getli原创 2015-01-14 22:10:29 · 3189 阅读 · 0 评论 -
C++中open() 函数不能传string的解决方法
C++ 的open()只能传入const char * 类型的,当传入string类型的就会出错,对此C++中提供了c_str()的解决方法 例如: ofstream out; string filename; filename = "C:\\Users\\Administrator\\0113\\01\\" + argv[1];原创 2015-01-13 22:33:59 · 1020 阅读 · 0 评论 -
linux挂在文件成磁盘
dd if=/dev/zero of=fs count=256bs=1k //创建文件fs mke2fsfs //格式化文件 sudo mount ./fs/mnt原创 2015-02-15 16:51:33 · 447 阅读 · 0 评论 -
ubuntu环境下MySQL修改登录密码
一、拥有原来的myql的root的密码; 方法一: 在mysql系统外,使用mysqladmin # mysqladmin -u root -p password "test123"; Enter password: 【输入原来的密码】 方法二: 通过登录mysql系统, # mysql -uroot -p Enter password: 【输入原来的密码】 mysql>转载 2015-02-15 16:09:46 · 438 阅读 · 0 评论 -
ubuntu解决QT5不能输入汉字的问题
进入 /Qt5.3.1/Tools/QtCreator/bin/plugins/platforminputcontexts目录发现 官网提供的安装包仅仅有libibusplatforminputcont extplugin.so,对ibus输入法的支持 cd~/Qt5.3.1/Tools/QtCreator/bin/plugins/platforminputcontexts cp/usr/转载 2015-02-15 16:07:53 · 826 阅读 · 0 评论 -
MFC学习笔记一
滑块: CSliderCtrl 常用成员函数: SetLineSize() GetLineSize() SetPageSize() GetPageSize() SetRangeMax() GetRangeMax() SetRangeMin() GetRangeMin() SetRange() GetRange() SetPos() GetPos() 列表控件: CLis原创 2015-04-30 09:45:38 · 469 阅读 · 0 评论