定义一个Ip数据报,然后发送出去
来源:百度知道 编辑:UC知道 时间:2024/05/27 22:58:46
书本是用tcp/ip协议与网络编程。帮忙设计一个实验代码啊。明天考试要用。。
大家救命啊!!!
// Expm1.1
// Write a non-graphic standard C++ program:
#include <iostream>
void main(void)
{
std::cout<<"Hello!\n";
std::cout<<"Welcome to c++!\n";
}
// 清翔兔
/*
2. Write a program that counts and prints the number of lines, words, and letter frequencies in its input. For example, the input:
Two roads diverged in a yellow wood,
And sorry I would not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;
Would produce the output:
The input had 5 lines, 37 words, and the following letter frequencies:
A:10 B:3 C:2 D:13 E:15 F:1 ……
*/
#include <iostream>
#include <string>
#include <map>
using namespace std;
void main()
{
string word;
char p;
int line=1; //调整行数计算误差<