Search:

Type: Posts; User: tasha302

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,126

    Parallel structures

    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...
  2. Replies
    2
    Views
    936

    Constant pointers

    If I have this




    const HermitCrab* t = &b;
    b.GetShellSize();
  3. Thread: linker error

    by tasha302
    Replies
    3
    Views
    1,969

    #ifndef NODE_H #define NODE_H #include...

    #ifndef NODE_H
    #define NODE_H

    #include <iostream>
    #include "Square.h"

    using namespace std;
    template <class T> class Node;
    template <class T> class Queue;
  4. Thread: linker error

    by tasha302
    Replies
    3
    Views
    1,969

    linker error

    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...
  5. Thread: Templates

    by tasha302
    Replies
    2
    Views
    898

    Thanks

    Thanks
  6. Replies
    2
    Views
    1,250

    I think the best way to solve your problem is to...

    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++)
  7. Thread: Templates

    by tasha302
    Replies
    2
    Views
    898

    Templates

    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...
  8. Replies
    14
    Views
    1,462

    I knew I was doing something wrong I really...

    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...
  9. Replies
    14
    Views
    1,462

    thanks I had that already but let me show u my...

    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;
  10. Replies
    14
    Views
    1,462

    I do have the declarations virtual attack() in...

    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();...
  11. Replies
    14
    Views
    1,462

    Here are the implementations I know I am doing...

    Here are the implementations I know I am doing something dumb somebody please point it out



    //Player Class

    //******************************************************************
    //Function ...
  12. Replies
    18
    Views
    2,435

    I have never really used while loops to build an...

    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]...
  13. Replies
    14
    Views
    1,462

    yes I did that and when I call the functions It...

    yes I did that and when I call the functions It only calls the base class definitions
  14. Replies
    14
    Views
    1,462

    Plymorphism again!!!

    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; ...
  15. Thread: Polymorphism

    by tasha302
    Replies
    5
    Views
    1,481

    Thanks I used what u guys said and it works i...

    Thanks I used what u guys said and it works i basically needed some kind of helper function
  16. Thread: Polymorphism

    by tasha302
    Replies
    5
    Views
    1,481

    within all the classes the function is overloaded...

    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...
  17. Thread: Polymorphism

    by tasha302
    Replies
    5
    Views
    1,481

    Polymorphism

    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...
  18. Replies
    10
    Views
    5,414

    No there are no other functions but that one that...

    No there are no other functions but that one that uses it it is the only instance i have of that object
  19. Replies
    10
    Views
    5,414

    also I did use a forward declaration but I got...

    also I did use a forward declaration but I got errors about invalid use of a struct classA or invalid use of struct classB
  20. Replies
    10
    Views
    5,414

    Thanks all that worked but now I am getting an...

    Thanks all that worked but now I am getting an error message that classA has not been declared




    #ifndef
    #define

    #include "classb.h"
  21. Replies
    10
    Views
    5,414

    #include "classb.h" #ifndef CLASS_A #define...

    #include "classb.h"

    #ifndef CLASS_A
    #define CLASS_A

    class A{

    public:
    .
    .
  22. Replies
    10
    Views
    5,414

    nested #includes

    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...
  23. Replies
    18
    Views
    2,720

    out of curiosity what is head equal in the...

    out of curiosity what is head equal in the begining of your code
  24. Replies
    2
    Views
    1,065

    Thanks a lot I couldn't figure out how to...

    Thanks a lot I couldn't figure out how to derefrence the pointer I was using ->, and Human.(*Human_Player);
  25. Replies
    2
    Views
    1,065

    operator overloading

    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:
    ...
Results 1 to 25 of 25