Op 6 nov. 2012 06:40 schreef "Jim Michaels" <[email protected]> het
volgende:
>
> 32\errgw32bmatch2:bmatch2.cpp:404:49: error: no match for 'operator=' in
'iSpecAttrib = (& iSpecEl)->__gnu_cxx::__normal_iterator<_Iterator,
_Container>::operator-><SElement*, std::vector<SElement>
>()->SElement::lsAttributes.std::list<_Tp,
_Alloc>::begin<std::basic_string<char>,
std::allocator<std::basic_string<char> > >()'
>
> 32\errgw32bmatch2:bmatch2.cpp:404:93: error: no match for 'operator!=' in
'iSpecAttrib != (& iSpecEl)->__gnu_cxx::__normal_iterator<_Iterator,
_Container>::operator-><SElement*, std::vector<SElement>
>()->SElement::lsAttributes.std::list<_Tp,
_Alloc>::end<std::basic_string<char>,
std::allocator<std::basic_string<char> > >()'
>
> typedef struct {
>     std::string
>         name,
>         val;
>     bool isBoolean;
>     VUI hitLineNumbers;
> } SAttribute;
> typedef  std::list<SAttribute> LSA;
> typedef  std::list<SAttribute>::iterator LSAI;
>
> bool attribNameIsInSpecElement(std::string tagName, std::string attrib,
VSEI& iSpecEl, LSAI& iSpecAttrib, bool isXHTML, bool isXML) {

Why are you passing the iterator references into the function when you set
them below anyway? Remove these function parameters, and make the variables
local to their for loop.

>     for (iSpecEl=vseSpecElements.begin(); iSpecEl !=
vseSpecElements.end(); iSpecEl++) {
>         if (compare(tagName,iSpecEl->tagName,isXHTML,isXML)) {
>             for (iSpecAttrib=iSpecEl->lsAttributes.begin(); iSpecAttrib
!= iSpecEl->lsAttributes.end(); iSpecAttrib++) {
>
>
> where it's having trouble is with assigning and equating to LSAI
variables. specifically last and first line of function nothing is defined
as operators for any iterator that's a reference.
>
> maybe there's something I am missing here. I wanted to modify the
original iSpecAttrib.
> I don't know enough about iterators to figure out how to pass a value
back in an argument to the original variable in c++ now except to use
pointers...
> I really wanted to use references, they are SO much more convenient.

It is idiomatic c++ to pass iterators by value, not by reference.

Ruben

>
> -------------
> Jim Michaels
> [email protected]
> [email protected]
> http://RenewalComputerServices.com
> http://JesusnJim.com (my personal site, has software)
> ---
> IEC Units: Computer RAM & SSD measurements, microsoft disk size
measurements (note: they will say GB or MB or KB or TB when it is IEC
Units!):
> [KiB] [MiB] [GiB] [TiB]
> [2^10B=1,024^1B=1KiB]
> [2^20B=1,024^2B=1,048,576B=1MiB]
> [2^30B=1,024^3B=1,073,741,824B=1GiB]
> [2^40B=1,024^4B=1,099,511,627,776B=1TiB]
> [2^50B=1,024^5B=1,125,899,906,842,624B=1PiB]
> SI Units: Hard disk industry disk size measurements:
> [KB] [MB] [GB] [TB]
> [10^3B=1,000B=1KB]
> [10^6B=1,000,000B=1MB]
> [10^9B=1,000,000,000B=1GB]
> [10^12B=1,000,000,000,000B=1TB]
> [10^15B=1,000,000,000,000,000B=1PB]
>
>
>
------------------------------------------------------------------------------
> LogMeIn Central: Instant, anywhere, Remote PC access and management.
> Stay in control, update software, and manage PCs from one command center
> Diagnose problems and improve visibility into emerging IT issues
> Automate, monitor and manage. Do more in less time with Central
> http://p.sf.net/sfu/logmein12331_d2d
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to