#include <iostream>
#include <map>
#include <iostream>
#include <windows.h>
using namespace std;
void myPrintf(void *a)
{
cout<<"hello"<<endl;
}
int main()
{
// int *a=new int(10);//一个数
// cout<<*a<<endl;//10
// delete a;
//
// int *arr=new int[10];//数组
// for(int i=0;i<10;i++)
// {
// arr[i]=i+1;
// }
// for(int i=0;i<10;i++)
// {
// cout<<arr[i]<<' ';
// }
// cout<<endl;
// delete []arr;
//
// int num=10;
// int *ptr=#
// *ptr=20;
// cout<<*ptr<<endl;//20
// cout<<num<<endl;//20
// myPrintf(ptr);
//
// string str="hello,world,world";
// cout<<str.find("world")<<endl;//6
// cout<<str.find(',')<<endl;//5 第一次出现的位置
// cout<<str.rfind("world")<<endl;//12 最后一次出现的位置
//
//
// map<string,int> m;
// m.insert(pair<string,int>("jkl",18));
// m.insert(pair<string,int>("lyf",20));
// m.insert(pair<string,int>("fbb",19));
// cout<<m["jkl"]<<endl;//输出key对应的value
// cout<<m["lyf"]<<endl;
// cout<<m["fbb"]<<endl;
//vector可以动态扩展,数组是静态空间 192
//空指针使用NULL,不能使用0
//oop Object Oriented Programming 面向对象编程
//SSH(Secure Shell,安全外壳)是一种网络安全协议
//SSH协议通过对网络数据进行加密和验证,在不安全的网络环境中提供了安全的网络服务。
//Linux下信号处理函数
//linux抓包指令 tcpdump
//在Windows的网络编程中,需要先初始化Winsock库
//而MAKEWORD函数就可以用于指定请求的Winsock版本
//包含在两个头文件<windows.h> <winsock2.h>
//MAKEWORD函数是Windows编程中的一个宏。
//该宏将两个字节组合成一个WORD类型的值,WORD类型通常为16位的无符号整数
// WSADATA wsaData;
// int iResult;
//
// // Initialize Winsock
// //MAKEWORD(2,2)表示请求使用2.2版本的Winsock库
// iResult = WSAStartup(MAKEWORD(2,2), &wsaData);
// if (iResult != 0)
// {
// printf("WSAStartup failed: %d\n", iResult);
// return 1;
// }
BYTE bLow = 0x12;
BYTE bHigh = 0x34;
WORD wResult = MAKEWORD(bLow, bHigh);
printf("The result is: %04X\n", wResult);//3412
//linux下头文件<execinfo.h>
return 0;
}
11-19
07-10
04-21
03-07
2726
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交