I have a binary search tree class and i need to write functions to peform on a binary search tree such as are two trees similar in structure, what is the height of Tree A, is Tree A perfect and the...
Type: Posts; User: tasha302
I have a binary search tree class and i need to write functions to peform on a binary search tree such as are two trees similar in structure, what is the height of Tree A, is Tree A perfect and the...
If I have this
const HermitCrab* t = &b;
b.GetShellSize();
#ifndef NODE_H
#define NODE_H
#include <iostream>
#include "Square.h"
using namespace std;
template <class T> class Node;
template <class T> class Queue;
I am trying to fix a linker error the error basically states this when I type make:
g++ -Wall -ansi -c Proj5Aux.cpp
g++ -Wall -ansi -o Proj5 Proj5.cpp...
Thanks
I think the best way to solve your problem is to use strings
i.e.
vector<string>ChainSeq;
string s1;
for(int i= 0; i<sze; i++)
I have a template queue class and I need to define it in another class which isn't templated how do I go about doing that? Do I need to make all classes using the Queue template classes?
a little...
I knew I was doing something wrong I really thought I had them declared the same thanks for being my eyes because they are so tired of looking at this code. Thank You, u don't know how much I...
thanks I had that already but let me show u my main
void BeginGame(string f1, string f2, string _Player)
{
Human HumanPlayer(f2);
Player* Player1 = &HumanPlayer;
I do have the declarations virtual attack() in all three header files and when i instantiate the objects
I have
Player1 = &HumanObject;
Player2 = &ComputerObject;
Player1.attack();...
Here are the implementations I know I am doing something dumb somebody please point it out
//Player Class
//******************************************************************
//Function ...
I have never really used while loops to build an array I think that might be where your problem is. Try using a for loop
for(int i =0; i<8; i++){
for(int j =0; j<8; j++){
array[i][j]...
yes I did that and when I call the functions It only calls the base class definitions
I have a base class with a virtual function that i define within the base class as well as the derived class in main I have the following code:
int main()
{
Player *A = &Human class; ...
Thanks I used what u guys said and it works i basically needed some kind of helper function
within all the classes the function is overloaded as a non member friend function I would like to know how to make the call within the function. So human class is derived from player class which has...
I would like to know if I can do this cin>>Player1 and if so how. Player1 is a base class pointer to a derived class. the base class is called Player of course is an abstract class, a Human class is...
No there are no other functions but that one that uses it it is the only instance i have of that object
also I did use a forward declaration but I got errors about invalid use of a struct classA or invalid use of struct classB
Thanks all that worked but now I am getting an error message that classA has not been declared
#ifndef
#define
#include "classb.h"
#include "classb.h"
#ifndef CLASS_A
#define CLASS_A
class A{
public:
.
.
I have two classes class a and class b
I #include class a in class b anb class b in class a the reason for this is that class a needs to interact with class b and vice versa. I have my #include...
out of curiosity what is head equal in the begining of your code
Thanks a lot I couldn't figure out how to derefrence the pointer I was using ->, and Human.(*Human_Player);
Hi, I have three classes one is a game board, the other a human component and the other a computer component. i overload both the << >> operators in all three classes
function prototypes are:
...