Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Is incrementing iterators actually this slow?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="James Aguilar, post: 1536755"] It seems to work on small problems (sorting them correctly. Also, a little test code shows that, at least with g++ 3.3.3, it works: #include <string> #include <iostream> using namespace std; int main() { string a; cout << (*(a.begin() + a.length()) == '\0') << '\n'; a += "asad"; cout << (*(a.begin() + a.length()) == '\0') << '\n'; a = "OMGZ?"; cout << (*(a.begin() + a.length()) == '\0') << '\n'; return 0; } prints 1, 1, 1 on my system. Even if this is non-standard, I'm almost positive that it is not the problem. - JFA1 [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Is incrementing iterators actually this slow?
Top