/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int main()':
foo.cpp:29:99: error: cannot pass objects of non-trivially-copyable type 'std::string {aka class std::basic_string<char>}' through '...'
         scanf("%s%s%s%s%s%s",a[i].name,&a[i].qimo,&a[i].banji,&a[i].bangan,&a[i].xibu,&a[i].lunwen);
                                                                                                   ^
foo.cpp:29:99: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'std::string {aka std::basic_string<char>}' [-Wformat=]
foo.cpp:29:99: warning: format '%s' expects argument of type 'char*', but argument 3 has type 'int*' [-Wformat=]
foo.cpp:29:99: warning: format '%s' expects argument of type 'char*', but argument 4 has type 'int*' [-Wformat=]
foo.cpp:29:99: warning: format '%s' expects argument of type 'char*', but argument 7 has type 'int*' [-Wformat=]

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C++
递交时间
2015-07-22 20:54:39
评测时间
2015-07-22 20:54:40
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes