我不是 C 编程专家,但这是我正在处理的一段代码
static char gszBuf[10] ="1234567890";
#define LS_MAX_STRING 255
LoadDatatoBuffer(id, gszBuf, LS_MAX_STRING);
// this method will load the data wrt ID to gszBuf
考虑到上面的方法加载了一个超过10个字符的char字符串,即gszBuf = "abcdefghijklmnopqr";
上面的代码在 msdev 6.0 中运行没有任何问题。但是当我们尝试复制上述数据时,使用 Visual Studio 2010 创建的同一应用程序崩溃。我的问题是是什么让上述代码在 msdev 6.0 中工作以及为什么它不能在 Visual Studio 2010 中运行