
c++
文章平均质量分 52
#花生酥
c,c++的学习者
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
windows上利用C++语言查询设备 (windows,vs2010,SetupDiEnumDeviceInfo)
代码功能将windows设备遍历一次,然后将结果直接存放到map容器中,需要清楚其中一个设备的个数,直接通过map可以查询 #include <Windows.h> #include <setupapi.h> #include <string> #include <vector> #include<map> #include<stdio.h> #pragma comment(lib, "setupapi.lib") using nam原创 2021-05-19 14:51:13 · 771 阅读 · 0 评论 -
C/C++下利用UDP实现通信(windows10,vs2010)
每一天都值得去热爱! udp客户端代码 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> #include<WS2tcpip.h> #include <windows.h> #pragma comment(lib,"ws2_32.lib"...原创 2021-05-07 13:22:13 · 1494 阅读 · 5 评论 -
编译器警告:C4996
你的代码使用标记为已弃用的函数、类成员、变量或 typedef。通过使用__declspec(deprecated)修饰符或 c + + 14 特性来弃用符号[[deprecated]]。实际的 C4996 警告消息由deprecated声明的修饰符或特性指定。(意思就是这个代码以前可以用,我们更新了,这个函数不安全,会提出警告) 本质没有任何影响,关了这个警告,不影响程序的运行 解决方法: 若要在 Visual Studio IDE 中关闭整个项目的警告: 1.打开项目的 "...原创 2021-03-13 15:34:16 · 984 阅读 · 0 评论 -
我的第一个MFC文件
接触到c++的前端,感觉和C#有点相似,可能是主观意愿的问题吧,感觉c#更加放便一点。 void C计算器Dlg::OnBnClickedButton1() { // TODO: 在此添加控件通知处理程序代码 int number1=GetDlgItemInt(IDC_EDIT1); int number2 = GetDlgItemInt(IDC_EDIT2); SetDlgItemInt(IDC_EDIT3, number1 + number2); } void...原创 2021-02-16 13:38:23 · 107 阅读 · 0 评论 -
借助c++完成随机数字的输出
借助srand以及rand 完成随机数字的输出 #include<stdlib.h> #include<time.h> //调用时间函数 #include<iostream> using namespace std; int main() { int i,j; srand((int)time(0)); //以时间作为随机数的...原创 2018-06-04 09:11:38 · 312 阅读 · 0 评论 -
C++完成星形图形的输出(对循环嵌套的应用)
编程输出以下图形 * *** ***** ******* ********* ...原创 2019-05-05 20:37:21 · 3277 阅读 · 0 评论 -
进制转化,对新手比较友好那种
二进制与十进制的转化: *128 *64 *32 *16 *8...原创 2019-09-14 10:18:01 · 130 阅读 · 0 评论