But I am shifting the whole array. I am shifting the first x entries in the array and the first one does not go to the bottom of the array but to the tail end of the entries I am shifting. So the addition entries in the array are irrelevant and stay as they are...
> -----Original Message----- > From: Juan Carlos [mailto:[EMAIL PROTECTED] > Sent: 05 July 2004 10:32 > To: [EMAIL PROTECTED] > Subject: Re: [msvc] How to shift up array items > > > Hi, > > > Hi > > > > > Never used vectors.... But yes, using c++ > > > > Those two sentacnes don't really go togehter. ;-) > > > > It's in MSDN and is usually a much better alternitive to an array. > > You can use valarrays. For example: > > #include <valarray> > int main(int argc, char* argv[]) > { > int ar[] = { 0, 1, 2}; > > std::valarray<int> v(ar, sizeof(ar)/sizeof(ar[0])); > > //Shift vector ciclycally > v = v.cshift(1); > > > return 0; > } > > _______________________________________________ > msvc mailing list > [EMAIL PROTECTED] > See > http://beginthread.com/mailman/listinfo/msvc_b> eginthread.com > for subscription changes, and list archive. > > > > This message has been scanned for viruses by BlackSpider > MailControl - www.blackspider.com > This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding. _______________________________________________ msvc mailing list [EMAIL PROTECTED] See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.
