#include "Q1-VerifyUniqueCharInString.h"
#include <cstring>
#include <stdio.h>
#include <string.h>
using namespace std;
bool isUniqueChar(string str)
{
int length=strlen(str),i=0;
bool tab[] = new bool[length];
if (length > 0xff) {
return false;
}
for (; i<length;++i) {
if (str[i]) {
return false;
}
tab[str[i]]=true;
}
return true;
}
this is my code, and i use gcc+xcode....why there is always tell me cannot find strlen, i use both cstring and string.h...