I've never used it, but one of my professors told me about the Boehm-Demers-Weiser garbage collector. Apparently, you just link to it and it'll do the magic work.
Type: Posts; User: linuxdude
I've never used it, but one of my professors told me about the Boehm-Demers-Weiser garbage collector. Apparently, you just link to it and it'll do the magic work.
You can use the boost filesystem library. They make it convenient to work with URLS. Also, you could just use find_if and then tokenize your searches.
Thanks for the information. These responses confirmed my thoughts. The "effective" books are so darn...effective. I don't have that one though. I'll have to look into it.
I have been programming with the STL for a while now and I have a question about using functors. Look at this code
#include <iostream>
#include <vector>
#include <algorithm>
using namespace...
besides the fact that you have Struct with a capital, a struct and a class are the same thing in c++ save access controls. Does this make it clearer?
endl is different from \n
endl: Inserts a new-line character. Additionally, for buffered streams, endl flushes the buffer (i.e. writes all unwritten characters in the buffer to the output...
This code made me think. How does priority_queue compare elements?
#include <vector>
#include <iostream>
#include <queue>
int main()
{
std::vector<std::vector<int> > v;
...
add should be like all the other methods you declared. Taking one argument makes more sense. Also, since this is c++ you should take advantage of operator overloading.
Sorry, I meant boost::scoped_array.
Also auto_ptr doen't support proper deallocation on arrays. For that you need boost::scoped_ptr or something similar. Also be careful about multiple references with auto_ptrs, but they are...
I'm confused by what you mean here? If you have a template, then you will specialize functions. If you don't then you can overload them. Could you be more elaborate?
It's called Goobuntu
I have a particularly bad time with java forums, and I have a question. I was thinking that this question is more for c/c++ people anyway. I created some functions that I want to use. However, it...
However, a set has a few points of interests:
You cannot store the same element twice. If you need do this use a multiset
It will sort your contents. If you need to keep the ordering use...
Or you could be absurd and use the boost graph library :-D
Your loop isn't right.
while(scanf("%s", input) != EOF){
for(i=0;i<anagsize;i++){
if(areAnags(anagram[i],input) == 0){
Look at how they are getting compared. For example let's say the...
So for my example class B would be
class B : public A {
public:
using A::oper;
virtual double oper(double x, double y) {
return x * y;
}
};
This does as I expect, but did the...
Meh. I'd use python. It has a great liburl2 library and their regex library is good too. This isn't a troll, but I like to use tools that are good for the job. Are you required to use C?
collage is spelled college. Unless you mean a form of art?
Are you sure that is the standard? I'm not sure, but I can't find anything saying whether it will be filled with \0's or just be 'h', 'e', 'l', 'l', 'o', '\0', ????
I always thought it was the...
lol. Do you know about the break statement Jasper?
That is a simple mistake. Half would be a linear search. It may help to look at the complexities of the algorithms
linear = O(n) // data spread randomly
binary = O(log(n)) // data in order...
Would this be the appropriate solution
#include <iostream>
class A {
public:
virtual int oper(int x, int y) {
return x + y;
}
virtual double oper(double x, double y) {
...
That's gratitude there :-D Good job helping tabstop and rossipoo, I'm sure he appreciates it with messages like that!
You should look into salts if you want a secure password store. Linux stores (encrypted) user passwords in a file /etc/shadow. However, it is secure because it is only readable by root and even if...