变量类型报错
Action()
{
char filename[20];
char Cstring;
--------》 修改为 char Cstring[10];就不报错了
int Cint=100;
if (itoa((Cint,Cstring,
10))
lr_output_message("ok");
sprintf (filename, "log_%s.txt",Cstring);
lr_output_message ("New file name %s", filename);
return 0;
}
报错:
Virtual User Script started at : 2016-01-26 14:30:49
Starting action vuser_init.
Web Turbo Replay of LoadRunner 11.0.0 for Windows 7; build 8859 (Aug 18 2010 20:14:31) [MsgId: MMSG-27143]
Run Mode: HTML [MsgId: MMSG-26000]
Run-Time Settings file: "D:\loadrunner11\scriptCTest\\default.cfg" [MsgId: MMSG-27141]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(18): Error: C interpreter run time error: Action.c (18): Error -- memory violation : Exception ACCESS_VIOLATION received.
Action.c(18): Notify: CCI trace: Action.c(18): itoa(100, 0, 10)
.
Action.c(18): Notify: CCI trace: Compiled_code(0): Action()
.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
阅读(3739) | 评论(0) | 转发(0) |