gpt4 book ai didi

c - 如何从 web_reg_save_param 数组中检索特定索引值

转载 作者:行者123 更新时间:2023-11-30 17:01:31 24 4
gpt4 key购买 nike

我正在使用网络参数函数来检索某些值。我想从数组项中获取特定索引的值并将其存储在要在 web_link 调用中使用的参数中。

char * tempVal;
web_reg_save_param("dynArray","LB=/EmployeeProfile/","RB=\">","ORD=ALL",LAST);
tempVal = "{dynArray_2}";

上述语句没有错误,但访问 tempVal 时出现错误

vuser_init.c(143): web_link("emp") started      [MsgId: MMSG-26355]
vuser_init.c(143): Warning: The string 'tempVal' with parameter delimiters is not a parameter.
vuser_init.c(143): Error -27995: Requested link ("Text={tempVal}") not found [MsgId: MERR-27995]

最佳答案

您遇到的问题是基于 C 语言的。您不能像您所做的那样简单地将两个项目等同起来。

看一下 strcpy() 函数与 lr_eval_string() 的结合

strcpy (destination_C_variable, lr_eval_string( "{LoadRunner_source_variable}" ) );

关于c - 如何从 web_reg_save_param 数组中检索特定索引值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36976900/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com