下面是一个测试程序,
#include
一个数据库应用程序,用两种方法获得sql语句: 1、gets(sql_statement); 2、strcpy(sql_statement,"select * from table"); 然后在程序中执行sql查询,两种方法都能得到正确的结果, 但第1种方法运行出结果后,还会输出很多行的 ******* Internal heap ERROR 17112 addr=0x80779e0 ******* Dump of memory around addr 0x80779e0: 80777E0 00000000 00000000 00000000 00000000 [................] Repeat 30 times 807...
#include
在linux下用GCC编译下面一段代码:
#include
linux下,C程序里使用了gets(),编译的时候出现: the `gets' function is dangerous and should not be used. 请问这是怎么回事呢?如何解决?谢谢!
linux9.0上用gcc编译了一段程序,大致如下 int main() { char a[100], b[100]; char *c; printf("input a:"); scanf(a); printf("input b:"); gets(b); printf("input c:"); scanf(c); return 0; } 这段程序编译执行时,没在gets(b)那行停止等待输入,而是直接到了scanf(c)那行等待输入。 如果把程序改成这样没问题: int main() { char a[100], b[100]; char *c; pr...
系统总说 [code]strcmp.c:20: warning: assignment makes pointer from integer without a cast strcmp.c:22: warning: assignment makes pointer from integer without a cast[/code]