目录
2、int isdigit(char ch) <ctype.h>
3、int isalpha(int c) <ctype.h>
4、int atoi(const char* str) <stdlib.h>
5、char* itoa(int num) <stdlib.h>
1、setw(int n) #include<iomanip>
setw(int n) 设置域宽为n,只对紧接着的输出运算有关
#include<iostream>
using namespace std;
#include<iomanip>
int main()
{
	cout << 123456 << endl;
	cout << 11122 << setw(12) << endl;
	cout << 123 << setw(5) << 456 << setw(5) << endl;
	cout << 12  << setw(3) << 34  << setw(3) << 56 << setw(3) << endl;
	return 0;
}① 设置域宽当n小于字段长度时不进行操作,当n大于字段长度时,对字段左部分补0,类似于printf语句中的符号%nd 起到设置n个域宽的作用
② 主要是这个紧接着的特性,体会一下 下方123使用到了第二行setw(12)所设置的域宽就可以理解了。

2、int isdigit(char ch) #include<ctype.h>
如果是数字返回非0, 不是数字返回0
是数字即为真
#include<iostream>
using namespace std;
#include<ctype.h>
#include<string>
int main()
{
	cout << isdigit('a') << endl;
	cout << isdigit('1') << endl;
	string s("abc123def456");
	for (auto& e : s)
	{
		if (isdigit(e))
			cout << "is number" << endl;
		else
			cout << "is not number" << endl;
	}
	return 0;
}
3、int isalpha(int c) #include<ctype.h>
template<class E>
    bool isalpha(E c, const locale& loc) const;和上面用法一样 为字母返回非零值,不是字母返回0
是字母即为真

4、int atoi(const char* str) #include<stdlib.h>
将一串字符转换为int型
5、char* itoa(int num) #include<stdlib.h>
将数字转为一串字符串


















