hi folks,
I am getting the below error ,
I changed strcpy to strcpy_s but no result.
I checked for the data types of arguments passed , they are same. No difference.

I am using visual studio2005 .Net frame work.

What may be possible solution? please help...

 if (n>0)
    {
    strcpy(line, &str[n]);
    strcpy(str, line);

error C2660: 'strcpy' : function does not take 3 arguments

There must be something else wrong or you posted the wrong code because the code snippet you posted is correct.

I changed strcpy to strcpy_s but no result. I checked for the data types of arguments passed , they are same. No difference.

Really?

char *strcpy(
   char *strDestination,
   const char *strSource 
);

See http://msdn.microsoft.com/en-us/library/kk6xf663.aspx

errno_t strcpy_s (
   char *strDestination,
   size_t numberOfElements,
   const char *strSource 
);

See http://msdn.microsoft.com/en-us/library/td1esda9.aspx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.