【string 】字符串比较

#include	"stdafx.h"
#include    <string>  
#include    <iostream>  
#include    <stdlib.h>  
using namespace std;  
/*
strcmp编辑 锁定 C/C++函数,比较两个字符串
设这两个字符串为str1,str2,
若str1=str2,则返回零;
若str1<str2,则返回负数;
若str1>str2,则返回正数。
*/
int main()  
{  
	char	strNotice[256] = "";
	if(strcmp(strNotice,"") == 0)
	{
		cout<<"0"<<endl;
	}
	system("pause");  
	return 0;  
} 

posted @ 2016-09-29 17:14  byfei  阅读(350)  评论(0编辑  收藏  举报