This code is part of this program I'm doing. I've edited it so it would get shorter.

#include<stdio.h>
#include<string.h>

main()
{
   char zero[5][6] = {"|||||", "|   |", "|   |", "|   |" , "|||||"};
   char secOnes[5][6];

   strcpy(secOnes,zero);
   y=10;
   for(i=0;i<5;i++){
      gotoxy(20,y++);
      printf("%s", secOnes[i]);
   }
   getch();
}

When I try to compile it, it would give me the warning "Suspicious pointer in function main".

Can you guys tell me how to fix this?

I'd really appreciate it.

Thanks!

strcpy(secOnes,zero); needs to be strcpy( secOne, zero );
i needs to be declared so it does y.

Oh! I already figured it out.

I guess you can't copy multi-dimensional arrays directly.

I did this:

char zero[5][6] = {"|||||", "|   |", "|   |", "|   |" , "|||||"};
   char secOnes[5][6];
   for(i=0;i<5;i++)
      strcpy(secOnes[i],zero[i])

Sheesh.

^____^

strcpy(secOnes,zero); needs to be strcpy( secOne, zero );
i needs to be declared so it does y.

Oh, I didn't see your post.

Thanks!!

The people here are really nice.

^__^

This question has already been answered. Start a new discussion instead.