Strings

Hello i try to copy strings using strcpy but i get compilation error.
1
2
3
4
5
6
7
8
9
10
11
typedef struct Thing{
   char number[15];
}Thing;
Thing a;
char number2[15];
//but this doesn't work
strcpy(a.number,number2);




I get this error: warning: incompatible implicit declaration of built-in function ‘strcpy’ .
Can you help me?
Last edited on
#include <cstring>

And then use std::strcpy() instead of ::strcpy()
oh yeah I forgot to say.. I'm writing in C so that mens
#inlcude <string.h>;
Thx a lot man
Last edited on
Topic archived. No new replies allowed.