This is my clear() function:
template <typename Object>
void CircleList<Object>::clear()
{
CircleListNode<Object> *p = theBase;
if ( p->next == 0 || p->next ==theBase)
Type: Posts; User: tallguy
This is my clear() function:
template <typename Object>
void CircleList<Object>::clear()
{
CircleListNode<Object> *p = theBase;
if ( p->next == 0 || p->next ==theBase)
I am currently creating a circular linked class and I am having trouble with the operator= function. This is what I have.
template <class Object>
const CircleList<Object> &...
Ok I got that error to go away but now I'm having a problem in my main.
The error says undefined reference to CircleList<int>::CircleList()
Main File: http://rafb.net/p/C3Y5PO55.html...
Ok so I changed the NULLS to 0's and this is my error message now:
I have these three files and I am obtaining the error message:
NULL Undeclared.
http://rafb.net/p/3u04E569.html
http://rafb.net/p/hfzCT686.html
http://rafb.net/p/oSxr5T24.html
Anyone know...
But I'm doing that because I want to display it again on the next line as the first name.
void Graph::printPath( const Vertex & dest ) const
{
string m;
if( dest.prev != NULL )
{
vector<Edge> e = (dest.prev)->adj;
for(unsigned int i = 0; i< e.size(); i++)...
Well my program is pretty big but if any of you want to look at the files to see if I am going wrong anyplace else here they are:
Actor.cpp http://rafb.net/p/ubeLtL52.html
Actor.h ...
Ok so in graph.h i have
class Graph
{
public:
Graph( ) { }
Graph( std::vector<Actor> * d ) : data(d) { }
~Graph( );
void addEdge( const ActorDB::tag & sourceName, const...
Ok so in graph.h I put
std::vector<Actor> * setActorList();
and in graph.cpp I put
std::vector<Actor> * Graph::setActorList()
{
Where would the setActorList function to set the pointer go?
Ok I believe my problem is that when I create my Graph object I am not passing it the correct reference to the vector.
static Graph actorGraph;
That is how I'm currently calling it which...
Ok I've got a new error now.
void Graph::printPath( const Vertex & dest ) const
{
if( dest.prev != NULL )
{
printPath( *dest.prev );
cout << " was with ";
}
Below...
So I'm working on a project that solves the Kevin Bacon problem. The code works fine for a small file size, but I have to read in the entire IMDB movie database file, which contains thousands of...
Ok so here's my problem now....
#include "App.h"
#include "Movie.h"
#include "Actor.h"
#include "ActorDB.h"
#include "MovieDB.h"
Ok so I made actorGraph static. Now I have an error in my actorConnections function:
"undefined reference to Movie::actorGraph"
I'm sure this has something to deal with it being static, so is...
I need one actorGraph for all the movies because this is the Kevin Bacon problem, so I need connections(vertices) between all actors in all movies. I know, this will be a lot of edges.
Yes I do...
This is actorConnections function in my Movie.cpp file:
void Movie::actorConnections(ActorDB::tag a) const
{
for (unsigned i = 0; i <the_cast.size(); ++i)
{...
I'm not too familiar with pointers, but would I change
///The private graph for the Kevin Bacon Problem
mutable Graph actorGraph;
to
mutable Graph *actorGraph;
Is there any way to fix this?
MovieDB.h....
#ifndef MOVIEDB_H_
#define MOVIEDB_H_
#include <set>
#include <string>
class Movie;
This is the error message:
make -k all
Building file: ../Graph.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Graph.d" -MT"Graph.d" -o"Graph.o"...
I have a Graph.h file....
#ifndef GRAPH_H_
#define GRAPH_H_
#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
http://rafb.net/p/RksEga83.html