473,465 Members | 1,903 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

std::find

Hello,

I have a question. I have the following construct:

std::vector < std::vector < std::vector< AsMarkerMatchMatrix >> >
m_matchMatrices;

If I run a std::find on that I sometimes get the iterator to be some strange
number like -124224256, although I know there should not be a match. Usually
the iterator points to NULL, if there is no match.

Anybody experienced the problem? MS c++ 7.1

Also I get an "could not deduce template argument" error, if I do not
implement the == operator, although the parent class implements it.

Greetings, Peter


Jul 19 '05 #1
3 14162

"Peter Meier" <pe*********@ar-solutions.de> wrote in message
news:bl**********@wsc10.lrz-muenchen.de...
Hello,

I have a question. I have the following construct:

std::vector < std::vector < std::vector< AsMarkerMatchMatrix >> >
m_matchMatrices;

If I run a std::find on that I sometimes get the iterator to be some strange number like -124224256, although I know there should not be a match. Usually the iterator points to NULL, if there is no match.
Show us a small compilable example that gives the
problem behavior.
Anybody experienced the problem? MS c++ 7.1

Also I get an "could not deduce template argument" error, if I do not
implement the == operator, although the parent class implements it.


Show a small example that gives this error.

My crystal ball rolled down the driveway and got hit by a car.

-Mike

Jul 19 '05 #2
Found the problem: I should compare with vector.end() to find out, if there
was a match, but for the second question I did not find an answer.

Greetings, Peter
Hello,

I have a question. I have the following construct:

std::vector < std::vector < std::vector< AsMarkerMatchMatrix >> >
m_matchMatrices;

If I run a std::find on that I sometimes get the iterator to be some strange number like -124224256, although I know there should not be a match. Usually the iterator points to NULL, if there is no match.

Anybody experienced the problem? MS c++ 7.1

Also I get an "could not deduce template argument" error, if I do not
implement the == operator, although the parent class implements it.

Greetings, Peter

Jul 19 '05 #3
"Peter Meier" <pe*********@ar-solutions.de> wrote in message
news:bl**********@wsc10.lrz-muenchen.de...
Found the problem: I should compare with vector.end() to find out, if there was a match, but for the second question I did not find an answer.


Please don't top-post.

We cannot answer your question until you provide
context (code).

-Mike
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: zhou | last post by:
Hi there, We have a compiler specific issue which requires us to force template instantiation. This works fine. The problem comes when I try using std:find() on vector. Since vector has no member...
3
by: Old Wolf | last post by:
In the documentation for std::find, it says: find returns the first iterator i in the range [first, last) for which the following condition holds: *i == value. However in my compiler's...
1
by: Adam Teasdale Hartshorne | last post by:
I would be extremely grateful if somebody could tell me what as I getting wrong with this little bit of code to find the index of a particular element in a std::vector std::vector<int>...
18
by: ma740988 | last post by:
Trying to get more acclimated with the use of function objects. As part of my test, consider: # include <vector> # include <iostream> # include <algorithm> #include <stdexcept> #include...
7
by: Bit byte | last post by:
I have the ff code: list<string> *m_alive_list ; list<string>::iterator my_iter; my_iter = find(m_alive_list->begin(), m_alive_list->end, string(inbox) ; Compiler barfs on 2nd line with this...
8
by: brekehan | last post by:
If I have a class MyClass { ...bunch o data and methods int x; }; and a stl container of MyClass objects Is there a way to use std::find to get all the elements whose member x
4
by: Anonymous | last post by:
I ahve a vector of doubles taht I need to extract values from. I was just about to use the STL find() algo, but I have a couple of questions: first: can you specify the tolerance threshold to...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.