自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 Makefile编写

makefile编写

2023-01-16 20:04:50 145

原创 Linux C/C++实现随机数

#include <stdlib.h>#include <time.h>#include <stdio.h>int main(){ //随机种子 srand((unsigned int)time(NULL)); for(int i = 0;i < 10 ;i ++) { //printf("%d ",rand()%101);//生成0~100之间 printf("%d ",rand()%101 - 50);//生成-50~50之间 }

2021-10-24 11:18:49 3778

原创 虚拟机映射、虚拟机与物理机共享文件夹

1.安装Samba软件包 sudo apt-get install samba2.更改Samba配置文件//建议备份sudo vi /etc/samba/smb.conf3.在smb.conf末尾添加[share] comment = VMware Ubuntu Share path = / writable = yes browseable = yes create mask = 0777目录可以自定义4.创建共享用户sudo smbpasswd -a 用户名(

2021-10-24 06:00:00 610

原创 C/C++字符串及其QString之间的转换

QString str = QString("trans %1").arg("test"); qDebug() << str; //QString 转 const char* 可以去掉QString中的双引号 const char* Cstr = str.toUtf8().data(); printf("%s\n",Cstr); //QString 转 string std::string CPPstr= str.toStdString();

2021-10-17 12:12:44 756

原创 Qt获取当前系统时间和时间戳及其之间转换

#include <QCoreApplication>#include <QDateTime>#include <QDebug>#include <QDate>int main(int argc, char *argv[]){ QCoreApplication a(argc, argv); //获取当前系统时间 QDateTime TodayTime = QDateTime::currentDateTime(); qD

2021-10-16 21:02:07 3623

原创 Linux c/c++ 遍历指定目录下的文件

struct dirent{long d_ino; /* inode number 索引节点号 /off_t d_off; / offset to this dirent 在目录文件中的偏移 /unsigned short d_reclen; / length of this d_name 文件名长 /unsigned char d_type; / the type of d_name 文件类型 /char d_name [NAME_MAX+1]; / file n

2021-08-29 13:26:27 762

原创 Linux C/C++ 读写文件

#include <iostream>#include <string>#include <string.h>#include <cstdlib>#include <fstream>#include <streambuf>#include <sstream>using namespace std;string C_Read_And_Write_File(const char* FileName,cons

2021-08-22 13:33:18 935

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除