473,399 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

error: expected `;' before iter ?

i am having in my code like

Expand|Select|Wrap|Line Numbers
  1. std::list<T*>::const_iterator iter=lst.begin();
and i am getting error


Expand|Select|Wrap|Line Numbers
  1.  error: expected `;' before âiterâ
  2. /root/INCLUDE/cw/gdlist.h:140: error: âiterâ was not declared in this scope
  3. /root/INCLUDE/cw/gdlist.h:142: error: âiterâ was not declared in this scope
  4. /root/INCLUDE/cw/gdlist.h: In member function âT*& CWGDList<T>::at(size_t)â:
  5. /root/INCLUDE/cw/gdlist.h:176: error: expected `;' before âiterâ
  6. /root/INCLUDE/cw/gdlist.h:178: error: âiterâ was not declared in this scope
  7. /root/INCLUDE/cw/gdlist.h:180: error: âiterâ was not declared in this scope
  8. /root/INCLUDE/cw/gdlist.h: In member function âconst T* CWGDList<T>::at(size_t) constâ:
  9. /root/INCLUDE/cw/gdlist.h:208: error: expected `;' before âiterâ
  10. /root/INCLUDE/cw/gdlist.h:210: error: âiterâ was not declared in this scope
  11. /root/INCLUDE/cw/gdlist.h:212: error: âiterâ was not declared in this scope
  12. /root/INCLUDE/cw/gdlist.h: In member function âvoid CWGDList<T>::clearAndDestroy()â:
  13. /root/INCLUDE/cw/gdlist.h:234: error: expected `;' before âiâ
  14. /root/INCLUDE/cw/gdlist.h:236: error: âiâ was not declared in this scope
  15. /root/INCLUDE/cw/gdlist.h: In member function âT* CWGDList<T>::find(CWBoolean (*)(const T*, const void*), const void*) constâ:
  16. /root/INCLUDE/cw/gdlist.h:270: error: expected `;' before âiterâ
  17. /root/INCLUDE/cw/gdlist.h:272: error: âiterâ was not declared in this scope
  18. /root/INCLUDE/cw/gdlist.h: In member function âvoid CWGDList<T>::insertAt(size_t, T*)â:
  19. /root/INCLUDE/cw/gdlist.h:372: error: expected `;' before âiterâ
  20. /root/INCLUDE/cw/gdlist.h:374: error: âiterâ was not declared in this scope
  21. /root/INCLUDE/cw/gdlist.h:376: error: âiterâ was not declared in this scope
  22. /root/INCLUDE/cw/gdlist.h: In member function âT* CWGDList<T>::remove(CWBoolean (*)(const T*, const void*), const void*)â:
  23. /root/INCLUDE/cw/gdlist.h:460: error: expected `;' before âiterâ
  24. /root/INCLUDE/cw/gdlist.h:462: error: âiterâ was not declared in this scope
  25. /root/INCLUDE/cw/gdlist.h: In member function âT* CWGDList<T>::removeReference(const T*)â:
  26. /root/INCLUDE/cw/gdlist.h:504: error: expected `;' before âiterâ
  27. /root/INCLUDE/cw/gdlist.h:506: error: âiterâ was not declared in this scope
  28. /root/INCLUDE/cw/gdlist.h: At global scope:
  29. /root/INCLUDE/cw/gdlist.h:570: error: type âstd::list<T*, std::allocator<T*> >â is not derived from type âCWGDListIterator<T>â
  30. /root/INCLUDE/cw/gdlist.h:570: error: expected â;â before âiterâ
  31. /root/INCLUDE/cw/gdlist.h: In constructor âCWGDListIterator<T>::CWGDListIterator(CWGDList<T>&)â:
  32. /root/INCLUDE/cw/gdlist.h:588: error: class âCWGDListIterator<T>â does not have any field named âiterâ
  33. /root/INCLUDE/cw/gdlist.h: In member function âCWBoolean CWGDListIterator<T>::atFirst() constâ:
  34. /root/INCLUDE/cw/gdlist.h:608: error: âiterâ was not declared in this scope
  35. /root/INCLUDE/cw/gdlist.h: In member function âCWBoolean CWGDListIterator<T>::atLast() constâ:
  36. /root/INCLUDE/cw/gdlist.h:624: error: âiterâ was not declared in this scope
  37. /root/INCLUDE/cw/gdlist.h: In member function âT* CWGDListIterator<T>::findNextReference(const T*)â:
  38. /root/INCLUDE/cw/gdlist.h:642: error: âiterâ was not declared in this scope
  39. /root/INCLUDE/cw/gdlist.h:648: error: âiterâ was not declared in this scope
  40. /root/INCLUDE/cw/gdlist.h:652: error: âiterâ was not declared in this scope
  41. /root/INCLUDE/cw/gdlist.h:658: error: âiterâ was not declared in this scope
  42. /root/INCLUDE/cw/gdlist.h: In member function âT* CWGDListIterator<T>::key() constâ:
  43. /root/INCLUDE/cw/gdlist.h:694: error: âiterâ was not declared in this scope
  44. /root/INCLUDE/cw/gdlist.h: In member function âT* CWGDListIterator<T>::operator()()â:
  45. /root/INCLUDE/cw/gdlist.h:712: error: âiterâ was not declared in this scope
  46. /root/INCLUDE/cw/gdlist.h:716: error: âiterâ was not declared in this scope
  47. /root/INCLUDE/cw/gdlist.h:724: error: âiterâ was not declared in this scope
  48. /root/INCLUDE/cw/gdlist.h:730: error: âiterâ was not declared in this scope
  49. /root/INCLUDE/cw/gdlist.h: In member function âvoid CWGDListIterator<T>::operator++()â:
  50. /root/INCLUDE/cw/gdlist.h:758: error: âiterâ was not declared in this scope
  51. /root/INCLUDE/cw/gdlist.h:770: error: âiterâ was not declared in this scope
  52. /root/INCLUDE/cw/gdlist.h: In member function âvoid CWGDListIterator<T>::operator--()â:
  53. /root/INCLUDE/cw/gdlist.h:786: error: âiterâ was not declared in this scope
  54. /root/INCLUDE/cw/gdlist.h: In member function âvoid CWGDListIterator<T>::operator+=(size_t)â:
  55. /root/INCLUDE/cw/gdlist.h:806: error: âiterâ was not declared in this scope
  56. /root/INCLUDE/cw/gdlist.h:822: error: âiterâ was not declared in this scope
  57. /root/INCLUDE/cw/gdlist.h: In member function âvoid CWGDListIterator<T>::operator-=(size_t)â:
  58. /root/INCLUDE/cw/gdlist.h:846: error: âiterâ was not declared in this scope
  59. /root/INCLUDE/cw/gdlist.h: In member function âT* CWGDListIterator<T>::remove()â:
  60. /root/INCLUDE/cw/gdlist.h:874: error: âiterâ was not declared in this scope
  61. /root/INCLUDE/cw/gdlist.h:876: error: âiterâ was not declared in this scope
  62. /root/INCLUDE/cw/gdlist.h:880: error: âiterâ was not declared in this scope
  63. /root/INCLUDE/cw/gdlist.h: In member function âvoid CWGDListIterator<T>::reset()â:
  64. /root/INCLUDE/cw/gdlist.h:906: error: âiterâ was not declared in this scope
  65. /root/INCLUDE/cw/gdlist.h: In member function âvoid CWGDListIterator<T>::toFirst()â:
  66. /root/INCLUDE/cw/gdlist.h:924: error: âiterâ was not declared in this scope
  67. /root/INCLUDE/cw/gdlist.h: In member function âvoid CWGDListIterator<T>::toLast()â:
  68. /root/INCLUDE/cw/gdlist.h:942: error: âiterâ was not declared in this scope
can any body help me plz, thanks in advance
Dec 15 '10 #1
1 3287
It looks like you forgot to
#include <list>
Dec 15 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: andy.herrera | last post by:
I'm getting this Error Message. Expected ';' Please Select One: <form name="form1"> <<------------ Error is here. <select name="selectTrans" onChange="If (this.value == 'checkout')...
6
by: Lawrence Spector | last post by:
I ran into a problem using g++. Visual Studio 2005 never complained about this, but with g++ I ran into this error. I can't figure out if I've done something wrong or if this is a compiler bug. ...
21
by: Ram Prasad | last post by:
I am trying to write a simple libspf2 plugin code for my postfix ( milter) I am getting this unhelpful error message when I try to compile gcc -g1 -Wall -I/usr/local/include/spf2 -I. -c mfunc.c...
5
by: amitmool | last post by:
hi, i have used the queue library file and try to use the template as template <class QueueItem> queue <QueueItem>::~queue() // line 25 { } template <class QueueItem> void...
2
by: parvtb | last post by:
I have the following code: #include <list> using namespace std; template <typename T> list<T>::iterator doStuff( list<T>::iterator myIter ) //--error here
1
by: lovecreatesbea... | last post by:
In the following function `HardwareStatusDb()', If its arguments are declared as type of `string', I get: main.cpp:5: error: expected initializer before ‘int’. The error disappears when those...
7
by: singhPrabhat | last post by:
Hi, I am using gcc (GCC) 4.2.1 (SUSE Linux). SUSE 10.3 While compiling a .c file I get following error :::: CCWebConfiguration.h:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or...
2
by: kevinr | last post by:
Hi, I am brand new to VB, and I am trying to deploy Office 2007 on my network here at work. We used part of this script to do another deployment, and I have taken pieces and tried to edit for this...
12
by: sam23 | last post by:
Hi all, im new to this programming language and i tried to use my Xcode to build and run this code but i got a error :(, and another error is i need a help guys #include <GLUT/glut.h>...
2
by: prw8864 | last post by:
I can not see what is causing this error.... iterator has been defined properly, but the error seems to point to the interator type. Errors I get with g++ svector.c++ -o svector 2> ./err_txt...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.