c++ - Assigning vector::iterator to char array post VS 2003 -


I compiled under VS 2008 for some C ++ files originally written in Microsoft Visual Studio (VS) 2003 I am trying to get the code and I am having a Vector :: Eratator to get the beginning of the four arrays to solve an efficient solution. I know that the watters were defined as a simple indicator type (T *), which is VS For class type between 2003 and VS 2005. Here's a simple example of what I'm talking about:

  type-up speed :: vector & lt; Char & gt; CharContainer; Typedef CharContainer :: Iterator input it; Int FindNumMsgs (InputIt _inputIter, int _len); Int Process Buffer Forums (Four Buffs [], Constant Arm_T MaxLen) {Int Newmumbs = Fickle Nummass (Input (Buff), MaxLen); ...}  

Then, VS In 2003, it compiles and works with any problem (since the Iterator is defined as T *). V.S. In 2008, these errors with the C440 (Function-Style-Cast), because I can not specify an interpreter with buffer pointer. 2008 What do I do to do this work in VS 2008 that the itater are now a class type? I can copy the buffer into a vector, then go into myVec.begin (), but I think I can escape this overhead.

The appropriate solution FindNumMsgs must be templateed, so that it can either be viable or Could work with pointers (because pointers can only be used as waiters). Something like this:

  template & lt; Class T & gt; Int FindNumMsgs (T, int count) {while (count--) {// do not do whatever it is ++; } Return n; }  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -