c array - warning: format not a string literal

后端 未结 6 1614
终归单人心
终归单人心 2020-12-25 09:45

I\'m attempting to learn C and already I\'ve run into an issue. I assume its trivial but I need to know it. I have written:

#include 
#include         


        
6条回答
  •  隐瞒了意图╮
    2020-12-25 10:33

    When using printf, the format string is better be a string literal and not a variable:

    printf("%s", str_a);
    

提交回复
热议问题