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

sprintf()导致RE

Posted by 350053879 at 2008-03-25 19:24:44 on Problem 1002
请问系统是不是不能使用sprintf()函数:
void print(int x,int cal)
{
	char *res;
	sprintf(res,"%03d",x/10000);
	cout<<res<<"-";
	sprintf(res,"%04d",x%10000);
	cout<<res<<" "<<cal<<endl;
}
这段代码导致RE,WHy

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