shift() in C std lib

Price, Erik eprice at ptc.com
Wed Dec 11 13:59:30 EST 2002


> -----Original Message-----
> From: Steven W. Orr [mailto:steveo at syslang.net]
> Sent: Wednesday, December 11, 2002 1:58 PM
> To: Price, Erik
> Cc: gnhlug-discuss at gnhlug.org
> Subject: Re: shift() in C std lib
> 
> 
> On Wed, 11 Dec 2002, Price, Erik wrote:
> 
> =>I'm wondering if there's a shift() function (similar to the 
> one in Perl/
> =>PHP/etc) in the C standard library?  (I have access to the C std lib
> =>that comes with Gentoo linux, if that matters any.)
> =>
> =>That would accept an array pointer and a char as an 
> argument and allow
> =>me to put that char at the beginning of the array?
> You're not describing shift. You're describing push.

I thought that push puts it at the end of the array.

> =>
> =>If not I can write this but I wanted to try accessing the 
> standard library.
> =>(It's for a homework assignment.)
> I think you're writing it. It'sabout two lines long :-)

Okay.  I was just wondering if it was predefined.  Thanks!



Erik



More information about the gnhlug-discuss mailing list