Hi,

    1: #include <iostream>
  2: 
  3: int main()
  4: {
  5:   short age[4]; 
  6:   short same_age[4];
  7:   age[0]=23;
  8:   age[1]=34;
  9:   age[2]=65;
 10:   age[3]=74;
 11: 
 12:   same_age=age; --> Array copying
 13: 
 14:   std::cout << same_age[0] << std::endl;
 15:   std::cout << same_age[1] << std::endl;
 16:   std::cout << same_age[2] << std::endl;
 17:   std::cout << same_age[3] << std::endl;
 18:   return 0;
 19: }

 

Array copying is done in line number 12. Is this allowed in C++? I did
googling, got few answers saying "No". Sending it to group for
confirmation.

 

Thanks,

Swamy SRK

 

 



[Non-text portions of this message have been removed]

Reply via email to