int isUnique(int values[],int size,int number)
{
int result=TRUE;
int i;
for(i=0; i<size;i++){
if (number==values[i])
/*Here causes the...
Type: Posts; User: flyAway
int isUnique(int values[],int size,int number)
{
int result=TRUE;
int i;
for(i=0; i<size;i++){
if (number==values[i])
/*Here causes the...
got it,thanks a lot.
Hi,Salem
what does your profile mean?
are you suggesting to use int main rather than void main?
Thanks for you two guys' advice.
aha,i use VC++ 6.0 to edit and compile the source code,so i choose "cout" to print something instead of "printf" just for convenience.
after your advice,i have...
The code's function is decribed as follow,but it doesn't work.The problem must be caused by the line "strcpy(pStr,temp);//This line caused the problem,so why?"
--but i don't know why.Any suggestion...
so if your program run ok,the last char it print will be something uncertain
another problem,
ptr1 = (char *) malloc(i1+i2+1 * sizeof(char));
//here,u should allocate (i1 + i2) byte memry for these two strings,because there is no "\0" added to the end of a char...
As we all know that in many C/C++ compilers the size of a null stucture is 1.
So,what is the usage of a null structure?
--thanks