I am working on a chess program. I have a base class called Piece and then other classes like Pawn, Rook, etc... Problem is that I can't get them to do dynamic binding. Here's the code that needs...
Type: Posts; User: black_spot1984
I am working on a chess program. I have a base class called Piece and then other classes like Pawn, Rook, etc... Problem is that I can't get them to do dynamic binding. Here's the code that needs...
For those who are curious, what I was doing wrong was in the way I was including the two files. It worked when I got them both into the file in the right place.
Thanks for the reply. I changed my code so it looks like:
bool ci_equal(char ch1, char ch2)
{
return toupper((unsigned char)ch1) == toupper((unsigned char)ch2);
}
size_t...
I'm trying to do a case insensitive comparison on two strings. I found this piece of code online but since I've never used std::search before, I don't know how to make the predicate part work. ...
When I run the code below with the private LinkedList declared without the static qualifier, it compiles and runs exactly as I expect. As soon as I add the static declaration, I get linker errors...
If anyone is curious, I fixed the problem. I was missing the (...) around the regex. I hate dumb mistakes.
I don't know why that was copied over incorrectly by the way. In the while statement, where I do boost::regex_constants::icase it really is correct. That's not the problem.
I'm trying to strip some simple HTML tags out of a randomly selected piece of test HTML code. I'm trying to use:
boost::match_results<std::string::const_iterator> what;
...
Sorry to bother everyone, I just figured out my mistake! Thanks for looking.
Okay, since no one has responded, I will include the entire output of make test. It is:
g++ -c -o obj/webCrawler.o -I utils/include -I inc src/webCrawler.cpp
g++ -c -o obj/stopWord.o -I...
And I'm trying to run make test. Take a look? Give some suggestions?
I have been chasing this bug all night! When I go to link my code it gives me the error:
It is called from here:
int main(int argc, char* argv[])
{
LinkedList<string>::Test(cout);
Okay, I'm back again. I moved everything over to the .h file and that made things a lot easier. I'm still using class, I will change that soon. But my next question is about the test() function. ...
When I try:
void Iterator<T>::nextBucket()
{
delete listIterator;
while(tableIndex<tableSize && table[tableIndex]->GetSize())
tableIndex++;
if(tableIndex<tableSize)...
Is it possible that this works on one compiler and not another? He is the complete compiler output:
1>------ Build started: Project: LinkedListTest, Configuration: Debug Win32 ------...
Please help? I really don't understand.
I'm trying to write a string into my stringstream but my compiler is coming up with a whole list of errors. Here's the code:
//Dustin Nicholes
//CS 240
//Web crawler driver class
#include...
My apologies. A bien tot!
If it helps, here is one of several errors issued by the compiler
driver.cpp(35) : error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const...
I'm trying to insert a string into my stringstream but I'm getting errors. Any thoughts?
//Dustin Nicholes
//CS 240
//LinkedList driver class
#include "stopWord.h"
#include "URL.h"...
Nobody can help me?
Ah... crap. :(
I hope that it is obvious what I am trying to do below. I want my Linked List nodes to be both templates and a friend class with my Linked List class. My compiler tells me:
error C2989:...
Thanks for the help everyone!
Wow, now I feel really dumb. Someone wanna give me a crash course in smart pointers? That's the first time I've even heard of them.
Now on that code I am getting a seg fault. My debug comes back with:
Program received signal SIGSEGV, Segmentation fault.
0x0806779d in BST::deleteAll (this=0xbff1e6a8, current=0x568b000f)...