
VC++6.0调试问题
很简单的一个程序#include<iostream.h>intmain(){unsignedshortsmall;unsignedlonglarge;constunsig...
很简单的一个程序
#include <iostream.h>
int main()
{
unsigned short small;
unsigned long large;
const unsigned short MAXSMALL=65535;
cout<<"Enter a small number:";
cin>>small;
cout<<"Enter a large number:";
cin>>large;
cout<<"small:"<<small<<"...";
while(small<large&&large>0&&small<MAXSMALL)
{
if(small%5000==0)
cout<<"OK";
small++;
large-=2;
}
cout<<"\nSmall:"<<small<<"Large:"<<large<<endl;
return 0;
}
编译链接都没有问题,为什么在调试状态下看变量的变化时显示CXX0069:Error:variable needs stack frame.
新手,能给予详细解释吗 谢谢了!
调试的时候在debubg窗口出现以下文字:Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.是什么意思! 展开
#include <iostream.h>
int main()
{
unsigned short small;
unsigned long large;
const unsigned short MAXSMALL=65535;
cout<<"Enter a small number:";
cin>>small;
cout<<"Enter a large number:";
cin>>large;
cout<<"small:"<<small<<"...";
while(small<large&&large>0&&small<MAXSMALL)
{
if(small%5000==0)
cout<<"OK";
small++;
large-=2;
}
cout<<"\nSmall:"<<small<<"Large:"<<large<<endl;
return 0;
}
编译链接都没有问题,为什么在调试状态下看变量的变化时显示CXX0069:Error:variable needs stack frame.
新手,能给予详细解释吗 谢谢了!
调试的时候在debubg窗口出现以下文字:Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.是什么意思! 展开
3个回答
展开全部
估计你是刚刚进去F10看见的small和large的状态。
简单点说,这是由于函数的运行时态原因造成的。函数的执行,需要把返回地址和参数等东西压入栈才能运行。而在你变量没申明的时候,是没有压入栈的。于是他就提醒需要栈帧。
具体的你可以去看看编译原理的运行时态问题。
希望有帮助,记得采纳啊。
简单点说,这是由于函数的运行时态原因造成的。函数的执行,需要把返回地址和参数等东西压入栈才能运行。而在你变量没申明的时候,是没有压入栈的。于是他就提醒需要栈帧。
具体的你可以去看看编译原理的运行时态问题。
希望有帮助,记得采纳啊。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询