Yes, I can agree with that. There was some misunderstandings. And I wasn't offended, really. I just can't stand to see people treat others so harshly when there is no real reason for it, and I'm...
Type: Posts; User: ArlexBee-871RBO
Yes, I can agree with that. There was some misunderstandings. And I wasn't offended, really. I just can't stand to see people treat others so harshly when there is no real reason for it, and I'm...
The reason I didn't post my actual problem that I was trying to solve and my goal was because I knew I would get flamed by some for asking help with something that I had almost no clue as to how to...
You are right. Going back and reading your comments now makes sense, which tells me you did have a clue as to what the algorithm was doing. I didn't know what the algorithm was, and you failed to...
std::set<> is slow. It's a binary tree, and there are faster ways to do what it does. It even shows how that is on that page that you found, but I guess you didn't even bother reading it.
...
No, it's not a Red-Black tree; a Red-Black tree is basically a binary tree. Rather, my original code is a digital search tries. Again, that proves you didn't understand the code even after finding...
I never claimed to be smarter than anybody else. In fact, I love to be proven wrong because that's when I learn, and that's when I'm elevated to a new level of understanding. You, too, seem like...
The bottle neck is the STL set container. You are correct as far as operator>> being slow, and that functions like read() and scanf() are much faster, but in my case that won't matter because I...
No, it's you who has passed the threshold where you aren't willing to help, and that's simply because you don't understand the code and you rather crap on other peoples post than be helpful.
I...
ok, I was wrong. The answer I get isn't correct. It's off by exactly 50%. Anyone know why that is?
Hello everyone.
I found this block of code on the web. It reads text from standard input and returns the total number of distinct words found in the text. It performs much faster than if I were...
yes it would, but like I said, it's from a test branch. I was testing the individual linear function to see if it was doing what it was supposed to do and I changed "+= "to "=" .
okay, I'll post my code and I hope I get to learn something new again. :)
I went digging up one of my older git test branch commits where I was trying to get the functionoids to work. The project...
Thanks m37h0d. I didn't know about functionoids (or function objects), but I've been working with them for the past few weeks. I like them.
As for my original problem, I now use a set of...
well, that .begin() call was a typo, so sorry about that. If I was to use a vector then the call would look something like ((a_test).*(a_test.p[0]))();
But that's not my concer. I want to know...
Hello,
I'm trying to have a STL set of pointer-to-member-functions in my class. I already know how to declare and define pointers-to-functions and use them with an ordinary array, but using the...
Can some one please tell me why I'm getting a 'Segmentation fault' on this code?
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
int radixSort(vector<long> &,...
The stream of characters coming in aren't states, I know, they are messages (events if you want to call it that). The kind of message I get determines which state i'm in. And the tokens I'm looking...
Well I'm confused for a reason I guess.
I'll be reading a file that may contain anything. So I have a stream of characters that's coming in and I'll have to extract those tokens. So if I have...
If I make each state a class then I end up with many classes. What if I decide to write a parser for c++; that's too many classes to keep track of. I guess that explains why we don't have c++...
Yes, it's just the parser. Later on he will tell us what he wants us to do with them.
Create a program that will read tokens written to match the following syntax and print the type and value of each token found. The statements will be found in a file that will be passed to the...
Okay, I get it now. Thanks Daved.
Hello.
Our current assignment in C++ class involves reading/writing strings to file in binary format. Our professor has his own string class which we can use, but I've decided to use...
Well in this case At() is used to read and write data.
int x = 3;
At(x) = 784.
The index 3 stores 784. To read index 3 you would call At(x), and if index doesn't exists in the list, say...
For our lab 1 our professor has given us an assignment to create a doubly-linked list template class. He is actually calling it a database, but it's really a doubly linked list. I've finished the...