All entries for February 2006
February 06, 2006
Const int or int for Array??
Do we have to use const int when assigning an array?? Below programme shows you that it is not a must!!!But, why in the past, we need to do that?? when C++ change the rule??? who change it actually?? Anybody knows about that??
#include
#include
using namespace std;
int main () {
int n,m, kk;
cout << "Pls input the initial size of a array:\t"< cin >> n; kk= 0; // for assign elements of arrays for (int k=1 ; k<=5 ; k++) { n +=1 ; double U[n]; cout< for (int j=0 ; j kk+=1; U[j]=kk; cout<< "U["< } } system ("pause"); return 0 ;
}