toanhoi bui

toanhoi bui

  • NA
  • 70
  • 207.3k

Reference array char* in C

Oct 28 2012 1:54 AM
Hello everybody, I want to reference a char * array in C but not success. Can you help me please?
void refarray(char * &arraybuff[])
{
char *s1="hello";
char *s2="everybody";
arraybuff[0]=s1;
arraybuff[0]=s2;

}
void main()
{
  char* getarray[2];
 refarray(&getarray[]);
 printf("%s %s",getarray[0],getarray[1]);
}

Answers (1)