关于字符串数组中 不重复的字符串的个数
马上大家帮帮忙 帮我想想 用c怎么写出在一个字符串数组中 不重复字符串的个数
[解决办法]
#include <set>#include <string>#include <vector>using namespace std;const char * test1 = "123456";const char * test2 = "124578";const char * test3 = "123456";std::set<int> a;int main(){ vector<string>temp; temp.push_back( test1 ); temp.push_back( test2 ); temp.push_back( test3 ); set <string> lTemp; for ( int i = 0 ; i < temp.size() ; ++i ) { lTemp.insert( temp.at( i ) ); } int result = lTemp.size(); char say [64] = {0}; sprintf( say , "%s%d" , "The Not Same String Number Is:" , result ); printf( say ); system( "pause" );}