貌似DEV C++编辑器能调试C语言的代码,而对于C++的代码调试不成功。
比如一段C的代码
#include<iostream>
using namespace std;
int f(int x){
cout<<x<<endl;
if(x>0){
f(x-1);
}
cout<<x<<endl;
}
int main(){
f(3);
return 0;
}
调试的就不怎么成功
而对于C而言
#include<cstdio>
using namespace std;
int f(int x){
printf("%d\n",x);
if(x>0){
f(x-1);
}
printf("%d\n",x);
}
int main(){
f(3);
return 0;
}
调试的就很成功 这是为什么哪?我也不知道耶。。。。。
求大牛路过时帮一下。