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

Re:bool *flag =new bool(m+1);这个开空间的怎么就和别的不一样????

Posted by temp_ptr at 2011-09-18 23:40:09 on Problem 2381
In Reply To:bool *flag =new bool(m+1);这个开空间的怎么就和别的不一样???? Posted by:baicaited at 2009-05-16 14:15:28
memset(flag, false, sizeof(bool) * (m+1));这个size是4*(m+1),应该是1*(m+1)才对,bool*是4byte,bool是1byte

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