sometimes when I run my program the exe window just appears for a sec and disappears.Is there any particular cause for this?
One of those programs is written here.
#include<iostream>
#include<string>
using namespace std;
int main()
{
int i;
string s;
for(i=0; ;i++)
{s=i;}
int n=s.length();
cout<<s[n]<<endl;
system("pause");
return 0;
}