首页 软件开发 代码片段 c/c++ ( Page 13 )

c/c++ 378

#C/C++
用C++自己实现Ping程序

// // Ping.h // #pragma pack(1) #define ICMP_ECHOREPLY 0 #define ICMP_ECHOREQ 8 // IP Head…

2015-06-19 756

#C/C++
RSA加密算法的C语言实现

// // main.cpp // RSA // // Created by liujan on 10/21/14. // Copyright (c) 2014 liujan. A…

2015-06-19 318

#C/C++
C连接mysql数据库

#if defined(_WIN32) || defined(_WIN64) //为了支持windows平台上的编译 #include <windows.h> #end…

2015-06-19 195

#C/C++
C++ Map快速入门

Map是一个关联性容器 map的存储类型是pair<const key,value>的类型 任何两个元素没有相同的key值 map是 1 、构造函数 map<co…

2015-06-19 466

#C/C++
一个纯C实现的图形化计算器

一个纯C实现的图形化计算器,可以鼠标点击操作 #include"graphics.h" #include"dos.h" #include&q…

2015-06-19 683

#C/C++
计算两个经纬度之间距离的C语言代码

// // main.c // Distance // // #include <stdio.h> #include <math.h> #define PI…

2015-06-19 377

#C/C++
c++使用win32 api windows下遍历文件夹

#include <stdio.h> #include <windows.h> BOOL IsRoot(LPCTSTR lpszPath) { TCHAR …

2015-06-19 610

#C/C++
C++中实现类似php的UTF8和UrlEncode函数

#include <string> #include <vector> inline BYTE toHex(const BYTE x) { return x…

2015-06-19 1,008

#C/C++
C++自定义函数生成不重复的随机数

C++自定义函数生成不重复的随机数 vector<int> getRandom(int total) { srand((int)time(NULL)); std::ve…

2015-06-19 833

#C/C++
C++ 获得本地磁盘盘符的容量信息

编程过程中涉及存储部分常常需要选择存储位置,此时比较关心的是各个磁盘盘符空间的总大小和剩余空间的大小。通过MFC的 List Control 控件可以将本地的磁…

2015-06-19 566

#C/C++
C++ 获取本机IP地址和HostName

#include <WinSock2.h> #include <iostream> using namespace std; #pragma comment…

2015-06-16 123

#C/C++
iOS启动屏后再加个闪屏的方法

在- (BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictiona…

2015-06-16 148
1 11 12 13 14 15 32