#include<IOSTREAM>
#include<string>
using namespace std;
int main()
{
	int intA = atoi("919.5");				 // int忽略不是0-9数字的字符,比如点
	long lngA = atol("MaNongKu.com666"); // 找不到就是0
	string strA = to_string(789); // 数字转字符串
	cout << intA << " " << lngA << " " << strA << endl;
	system("pause");
	return 0;
}运行结果是:
919 0 789