注意输出格式:十六进制不足两位要补零
#include<iostream>
#include<cstring>
#include<cstdlib>
using namespace std;
const int M = 1024;
int main()
{
char line[M], tmp[20];
int ip[8];
int count = 0;
cin.getline(line, M);
int i = 0, head = 0, len = 0;
bool flag = true;//是否合法
...