* dougie:
Quote:
* dougie:
Quote:
>* Alf P. Steinbach wrote:
Quote:
>>*
idar.douglas.hillgaar@gmail.com:
>>>Hi - the following code
>>>
>>Is not your actual code. Post a complete, minimal, actual example, and
>>indicate where in that code the compiler reports an error.
>>
>The problem is at the for loop in the test code and my own code:
>>
>for( i = my_list2.begin(), count = 0; i != my_list2.end() && count <
>size; i++, count ++)
>where I get the following error:
>" overloaded function with no contextual type information"
>
solved!:
>
list <int>::iterator i; should be: list<int>::iterator i;
the problem was the whitespace
Uh, good, problem solved, but bad, very bad!, that whitespace shouldn't
really matter. Perhaps what's lacking is to write 'std::list'? And
what about the 'count' (usage) versus 'counter' (declaration)?
This compiles cleanly using MSVC 7.1 and g++ 3.4.4, and should compile
cleanly on any conforming C++ implementation:
#include <list>
int main()
{
using namespace std;
list <int>::iterator i;
}
Btw., please don't top-post in this group.
See the FAQ item "How can I find out about general netiquette so I don't
embarrass myself?", currently at <url:
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.4>.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?