Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

memcpy函数怎么用?(+)

Posted by ZhangQi at 2005-02-07 22:55:41 on Problem 1906
#include<string.h>
long three[MaxTime][MaxLen];
int main()
{
    ...
    for (i=0; i<MaxLen; i++)
    {
        memcpy(three[i], three[i-1], sizeof(three[i-1])/sizeof(three[i-1][0]));//就是这句
        multiply(three[i], 3);
        ...
    }
    ...
}

这样WA了,后来我把memcpy这句改成了最原始的赋值就AC了,是我的memcpy用错了吗?可它在我的机器上运行是没问题的呀。请指教!

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator