All entries for Monday 06 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 ;
}


February 2006

Mo Tu We Th Fr Sa Su
Jan |  Today  | Mar
      1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28               

Search this blog

Galleries

Most recent comments

  • Thanks a lot for your info. I am puzzled because I cannot see anything about the GRUB during the ins… by on this entry
  • Well when I installed Fedora it will go through a stage where it should configure grub for you. GRUB… by on this entry
  • I can't unfortunately. I thought it was an expressionistic flourish (they characters come out as ran… by on this entry
  • Thank you, James. I will write more in the future. By the way, can you see the chinese poems above? by on this entry
  • This blog is awesome, I'm adding it to my favourites. by on this entry

Blog archive

Loading…
Not signed in
Sign in

Powered by BlogBuilder
© MMXXII