关于vs2010给字符串数组赋值的问题
我定义了一个字符串数组char p[]={""};然后给它赋值我是这么的scanf("%s",p);结果VS这么报错:警告 1 warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. d:\vc++6\c语言程序\卡尔训练器.cpp
然后我又这么赋值gets(p);,VS这么报错:警告 1 warning C4996: 'gets': This function or variable may be unsafe. Consider using gets_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. d:\vc++6\c语言程序\卡尔训练器.cpp
请教一下各位究竟怎么给一个字符串输入值来赋值,谢谢,感激不尽。