
c++编程语言手记
kikook
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【C++】const关键字小结(英文)
以后尝试着多用英文来写博客,最近看python-mysql的manual真的是不太舒服,18-10-4号刚出的,100页也没有翻译版本,只能硬着头皮看英文版本的[C++] "Use const whenever u need"1. variableswe got two types:1.1 const int num1.2 int const num1.3 UsageT...原创 2018-10-08 20:24:12 · 421 阅读 · 0 评论 -
visual studio(2015/2017)调试多线程程序
教程来自巨头微软官方机翻动手完成全部内容大约需要半小时完成整个教程的效果图:(本人使用vs2015 & C++)正文:开始调试多线程应用程序 (C#,Visual Basic、 c + +)Visual Studio 提供多种工具和用户界面元素,用于调试多线程应用程序。 本教程演示如何使用线程标记、“并行堆栈”窗口、“并行监视”窗口、条件断点、筛选器断点。 完成本教...转载 2019-02-18 01:38:01 · 22024 阅读 · 3 评论 -
[C++]产生随机数[通用方法]
近两天在做一个传感器网络通信的模拟器,需要产生某些确定的范围的随机数模拟随机发出信号的传感器,小结一下:使用srand(time(0))设置随机数种子,也可以写成srand(time(NULL)),需要头文件<time.h>和<stdlib.h>(c++建议使用<cstdlib>和<ctime>)使用rand()函数产生随机数一段小d...原创 2019-01-20 12:57:29 · 1375 阅读 · 0 评论 -
[C++]八大排序1M数据实测速度比较
耗时6.35小时,1M数据量实测,快排果然是最快的,//2018/1/5 发现希尔排序慢的有点过分,可能写得有问题,期末考完了改一下重新测原创 2019-01-04 23:12:18 · 653 阅读 · 0 评论 -
c++杂记
1.注意:delete掉的指针需要将其赋值为空,因为指针本身没有被删除原创 2018-11-13 14:14:08 · 106 阅读 · 1 评论 -
[C/C++]The differences between #ifndef & #pragma once
#ifndef CLASSNAME_H#define CLASSNAME_H#endifThis method can not solve the problem that once two classname is the same,then both of the class with same names could not be compiled.#pragma once...原创 2018-10-18 19:59:50 · 142 阅读 · 0 评论 -
[C/C++]没有名字的参数也可以用(英文)Functions with parameters holding no names
#include <bits/stdc++.h>using namespace std;int print_zero(size_t,int);int main(){ print_zero(1,1); return 0;}int print_zero(size_t,int){ cout << "zero" << endl;}It works...原创 2018-10-08 23:47:07 · 633 阅读 · 0 评论 -
【c/c++】详解size_t的前世今生
补充一点:在标准库中的定义是typedef unsigned int size_t;即可以用size_t定义当前运行环境下的无符号整形这保证了跨平台的兼容性,但是也要注意到这里的位数是不相同的关于typedef可以参考:详解typedef首先可以打开stdio.h文件查看一下size_t的定义:找到size_t的定义:这个文件中没有找到但是找到了size_t的...转载 2018-10-08 22:09:43 · 441 阅读 · 0 评论 -
【C/C++】什么是链式编程?What Is Chain Programming?(English)
We know two common func - memset & memcpy, so we can use these two functions to show what's chain programming:The inventer who invented these two fuctions left the definition like:[memset]vo...原创 2018-10-08 21:48:24 · 800 阅读 · 0 评论 -
【c++】Usage Of Void(English)
#include<bits/stdc++.h>using namespace std;//this program is about the usage of void in language C++//[usage of void]//1when func takes no arguments ,use void//default_return_type func(void...原创 2018-10-08 21:02:43 · 211 阅读 · 0 评论 -
[C/C++]Two different ways of using include
"-I" is a parameter to anotate position of header files, format:cc [options] [sources.cxx] -I path_of_directorisIn this sample(Makefile), we use "-I.", which indicate that we look for the heade...原创 2019-07-15 00:58:21 · 131 阅读 · 0 评论