No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
14 Posted Topics
Ok here is the code I am trying to compile remotly on a linux machine I am getting quite a few compile errors when I try to compile this Here is just a sample of the errors I am getting. [code]-bash-3.2$ gcc -o lemastsGCD lemastsGCD.cpp /tmp/cca8g62Q.o: In function `__static_initialization_and_destruction_0(int, int)': … | |
I am having a problem writing the last part of my code for this program. There is a DFS function that I need to write that is included in the header file of the graph.h my program. Here is the sample of code that my instructor gave me. [code=c++]template<class VertexType> … | |
The function that I am having a problem with is in the middle of this seperated from the rest of the code. [code=c++] #ifndef GRAPH_H #define GRAPH_H #include <string> #include "queue.h" using namespace std; class FileOpenError // Exception class -- cannot open input file { }; struct EdgeNode // Structure … | |
This grap is kicking my butt. I am not sure how to do it. Can someone please help explain these to me. [code=c++] // graph.h // -- adjacency list representation of a weighted graph // #ifndef GRAPH_H #define GRAPH_H #include <string> #include "queue.h" using namespace std; class FileOpenError // Exception … | |
I need some help with this binary search tree. I am having a problem printing out the tree. I don't quite understand how to do it. I know that I need to use recursive call to traverse to the end of the tree but the way the header file is … | |
yea I know I spelled destructor wrong what can I say my fingers got in the way of my typing I have scoured the internet and tried several different ways to implement the destructor on my link list queue. I highlighted the troulesome code like this //***************************************** code //***************************************** here … | |
When I try to compile and run this file I get a segmentation fault when the size function is called so I must not have it set up right. The size function returns the number of stored chars in the queue. So I am thinking that the size function in … | |
All this function is supposed to do is count each node in the queue and return the number of nodes. [code=c++] template<class SomeType> int TemplateQ<SomeType>::Size() const { int numberOfChars = 0; QueueNode<SomeType>* countPtr; if(IsEmpty) return 0; while(countPtr != rearPtr) { countPtr = frontPtr->data; numberOfChars ++; } } [/code] I am … | |
I am getting a syntax error when I try to compile. After I write a little code I try to compile to catch any of my mistakes. In this project I am to use a class queue template that is provided by my instructor here it is [code=cplusplus] #ifndef TEMPLATEQ_H … | |
First let me describe the program All it does is pull in some chars and stores them in a linked list of stacks. I have the code written to pull them in but when I need to print them I dont know how to go backwards without deleting the node. … | |
I was trying to figure this out but for some reason it is illuding me Ministack header provided [code=cplusplus] #ifndef MINISTACK_H #define MINISTACK_H const int MINI_STACK_SIZE = 5; // Fixed number of element in stack class MiniStack { private: int num; // Number of values stored in MiniStack char* stackPtr; … | |
Header file provided by instructor [code=cplusplus] #ifndef BIGSTACK_H #define BIGSTACK_H #include "ministack.h" struct ListNode // Description of a ListNode struct { MiniStack* stackPtr; // Pointer to a MiniStack object ListNode* nextPtr; // Pointer to next ListNode }; class BigStack // Description of BigStack class { private: int num; // Total … | |
Here is the header file I was given to use [code] // // ministack.h // #ifndef MINISTACK_H #define MINISTACK_H const int MINI_STACK_SIZE = 5; // Fixed number of element in stack class MiniStack { private: int num; // Number of values stored in MiniStack char* stackPtr; // Pointer to array … | |
This is the header file provided by my instructor. [code] // // unsortedlist.h // #ifndef UNSORTED_LIST_H #define UNSORTED_LIST_H struct UnsortedListNode // Description of list node { char ch; // Stores one character input from file UnsortedListNode* nextPtr; // Stores address of next node }; class UnsortedList // Linked list implementation … |
The End.