Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > popBack and pop...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 44137 of 48044
Post > Topic >>

popBack and popFront

by pleatofthepants <aaronWbryant@[EMAIL PROTECTED] > Mar 26, 2008 at 01:35 PM

I could use some help. I am writting two functions, one is popBack and
one is popFront.

popFront needs to remove a data element from the front of my data
structure.
popFront (T& n)
{

}
popBack needs to remove a data element from the rear of my data
structure
popBack (T& n)
{

}

I have two functions ****ftRight and ****ftLeft that will move the
elements in the array right or left.

void ****ftRight()
		{
			//decrement this iteration
			for (int i = size; i >= 0; i--)
			{
				data[i] = data[i - 1];
			}
			size++;
		}
		void ****ftLeft ()
		{
			for (int i = 0; i < size; i++)
			{
				data[i] = data[i + 1];
			}
			size--;
		}
 




 2 Posts in Topic:
popBack and popFront
pleatofthepants <aaron  2008-03-26 13:35:19 
Re: popBack and popFront
=?UTF-8?B?RXJpayBXaWtzdHL  2008-03-26 21:05:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 22:42:54 CDT 2008.