gpt4 book ai didi

c - 即使参数计数正确,也无法运行的参数太少

转载 作者:行者123 更新时间:2023-11-30 17:50:19 25 4
gpt4 key购买 nike

这是示例代码:

typedef struct
{
char symname[DLL_MAX_SYMNAME_LEN]; // Symbol name char
filename[DLL_MAX_FILENAME_LEN]; // File name from which the
// symbol comes
unsigned int vaddr; // Exact address of nearest symbol
} dll_sym_info_t;

extern void sbblink_write_one_frame(u8 In,u8 F,u8 Ph,u8 Sub,u8 Ch,u8 S,u8 T, u8 P);

const char * str_sbblink_write_OP_frame_channels = "sbblink_write_one_frame";
void (*fun_sbblink_write_OP_frame_channels) (u8 In,u8 Fpga,u8 InSlot,u8 SubCh,u8 Chan,u8 Size,u8 Type,u8 Print);
.
.
fun_sbblink_write_OP_frame_channels = (void (*) (u8,u8,u8,u8,u8,u8,u8,u8))sym.vaddr;
.
.
fun_sbblink_write_OP_frame_channels (0,SBBL_FLINK,PhSlotRRH,i,0,0,0,0);

但即使是错误:

error: too few arguments to function 'fun_sbblink_write_OP_frame_channels'

请帮我解决这个问题。

谢谢

最佳答案

尽量保持简单。如果“复杂”问题失败,请尝试更简单的方法,即

/* Since this doesn't work, let's try something that really should work
fun_sbblink_write_OP_frame_channels (0,SBBL_FLINK,PhSlotRRH,i,0,0,0,0); */

sbblink_write_one_frame(1,2,3,4,5,6,7,8);

然后,如果可行,请尝试:

/* Since this doesn't work, let's try something that really should work
fun_sbblink_write_OP_frame_channels (0,SBBL_FLINK,PhSlotRRH,i,0,0,0,0); */

/* OK, this worked, let's go one step forward
sbblink_write_one_frame(1,2,3,4,5,6,7,8); */
fun_sbblink_write_OP_frame_channels (1,2,3,4,5,6,7,8);

然后尝试:

/* OK, this silly stuff worked, let's go all the way
sbblink_write_one_frame(1,2,3,4,5,6,7,8);
fun_sbblink_write_OP_frame_channels (1,2,3,4,5,6,7,8); */
fun_sbblink_write_OP_frame_channels (0,SBBL_FLINK,PhSlotRRH,i,0,0,0,0);

您在每次尝试中获得的错误/成功应该有助于引导您解决问题。

关于c - 即使参数计数正确,也无法运行的参数太少,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17343802/

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