c array - warning: format not a string literal

后端 未结 6 1619
终归单人心
终归单人心 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:27

    The error is coming from printf(str_a);. Your code should be printf("%s",str_a); take a look at the following link for more info on printf. http://www.cprogramming.com/tutorial/printf-format-strings.html

提交回复
热议问题