小编Jar*_*ryd的帖子

当我使用多个字符串时,函数sscanf_s失败

我不明白为什么下面的代码失败了:

char    toto[54], titi[54]; //I already tried with allocations

sscanf_s(line, "%s-%s", &toto, &titi, sizeof(toto) + sizeof(titi));
Run Code Online (Sandbox Code Playgroud)

要么

sscanf_s(line, "%s-%s", &toto, &titi, sizeof(toto) + sizeof(titi));
Run Code Online (Sandbox Code Playgroud)

我的问题只有字符串(float,int,double等等),我使用Visual 2010.

有没有人有想法?非常感谢您的回答.

c parsing scanf visual-studio-2010

0
推荐指数
1
解决办法
4954
查看次数

标签 统计

c ×1

parsing ×1

scanf ×1

visual-studio-2010 ×1