I think I'm straight forward and I find to many cooks in the kitchen arguing what to call s spoon, that they forget to make the soup. Call it half a dozen or six and it's the same thing.
For the original poster, strings in C and strings in C++ can be different depending on who and what train of thinking they have and what context the two are talking about. But basically it's nothing more than a series of bytes with a terminating character at the end. That's not 100% true all the time, but usually the case. In context to the question initially posted a string, character array, buffer, etc. etc. all mean the same thing, they just different ways to get to the same thing. There are those that would like to polish their word smithing and say otherwise. If you are serious about learning about pointers then I suggest a book called Understanding Pointers in C by Yashavant P. Kanetkar. Though it might be a hard book to find. I picked it up when I was in India. -- Chris On Sat, 2007-12-22 at 17:53 -0700, Thomas Hruska wrote: > Robert Ryan wrote: > > ".....treat buffer as an array buffer[ character_position ]", > > can you explain this buffer; are you just using buffer to mean temp; > as in temp memory > > thanks > > bob ryan > > > > Christopher Carver <[EMAIL PROTECTED]> wrote: I'm not > going to provide source, but here are two ways to traverse a > > string which might get you going in the right direction. > > > > char *buffer = "Hello"; > > char *buffer_ptr; > > buffer_ptr = buffer; > > IMO, both are incorrect terminology and causes all sorts of > confusion. > Viewing all memory (allocated or not) as one big chunk, or Block, of > usable temporary data storage is a much more correct view. Memory has > no notion of "buffers" and "arrays". From Safe C++ Design Principles. > > -- > Thomas Hruska > CubicleSoft President > Ph: 517-803-4197 > > *NEW* MyTaskFocus 1.1 > Get on task. Stay on task. > > http://www.CubicleSoft.com/MyTaskFocus/ > > > > >
