About the problem related to "int a[10];",which I mentioned in my blogs before,I consulted several people,but there was no exact conclusion.But I found that when I change the compiler TCC to GCC or G++,that problem disappeared.As expected, it's associated with the compiler.As to exact reason,I don't know.
What's worth,I run a C++ program by G++ successfully a few days ago,but it couldn't be run today.It's a simple program about conversion of one's height.
//Conversion Of Your Height
#include <iostream>
int main(void)
{
using namespace std;
int inchheight,foot,inch;
const int ConversionFactor=12;
cout<<"Input your height in inches(only integer allowed):__\b\b";
cin>>inchheight;
foot = inchheight / ConversionFactor;
inch = inchheight % ConversionFactor;
cout<<"You are "<<foot<<" feet(foot) "<<inch <<" inch(es) high."<<endl;
return 0;
}
Here I just display the errors shown on the screen.
What's wrong with C4droid?

No comments:
Post a Comment