第十八章 12判断string类型字符串是否为空

// 12判断string类型字符串是否为空
/*#include <iostream>
#include <string>
using namespace std;
int main()
{
	string s1 = "";
	if(s1.empty()){
	    cout<<"s1为空"<<endl;
	}else{
	    cout<<"s1不为空:"<<s1<<endl;
	}

    return 0;	 
*/

  

posted @ 2012-09-24 22:07  简单--生活  阅读(663)  评论(0编辑  收藏  举报
简单--生活(CSDN)