hi all(function problem )
hi all i am new here
straight to the point
--------------------------------------------------------
Code:
#include<stdio.h>
void ekleme( int *s, int *t )
{
while('\0' != *s)
{
++s;
}
while('\0' != (*s = *t)){
++s;
++t;
}
}
main(){
int a;
int b=0,c=0;
char string1[1000],string2[1000];
while((a=getchar()) !=EOF)
string1[b++]=a;
string1[b]=0;
while((a=getchar()) !=EOF)
string2[c++]=a;
string2[c]=0;
void ekleme( int *string1, int *string2 );
printf("%s",string1);
getchar();
return 0;
}
---------------------------------------------------
this is my source code
it is a program to copy the string2 to the end of string 1 by calling ekleme routine with pointers
In the book i study c programming i can solve every problem so far without calling functions in main including this one but not with functions like ekleme
i think i am doing something wrong here with the function but what?
i would be grateful if someone can explain
thanks
p.s. compiler gives me error messages if i dont use
void ekleme( int *string1, int *string2 );
in everywhere why is that?