Search:

Type: Posts; User: xshapirox

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    4,479

    STL and Binary Search Trees

    Does the STL have an implementation of a Binary Search Tree or any sort of tree for that matter?
  2. Thanks, I think I got it. Forget the above...

    Thanks, I think I got it. Forget the above message.

    I understand now.

    I really appreciate ya'lls help. If there was anything I could do to show my appreciation I would (I got a bottle of brandy...
  3. When I try the above and try to compile I get...

    When I try the above and try to compile I get this error:




    Node.cpp: In method `Node::Node(const Customer &)':
    Node.cpp:4: type `Customer' is not an immediate basetype for `Node'


    This...
  4. Allright, I have a little problem though: When...

    Allright, I have a little problem though:

    When I try to declare a Customer in my Node header file, I get this error:




    In method `Node::Node(const Customer &)':
    Node.cpp:5: no matching...
  5. Everything is within the code above. I did not...

    Everything is within the code above. I did not include the header files because I thought that may be redundant. The declaration of customerValues is in the header and I declare it as an array: int...
  6. Allright, here is my code. My customer/data...

    Allright, here is my code.

    My customer/data class (basically the class that is encapsulated by the node)


    Customer :: Customer (int id, int items, int seconds)
    {
    customerValues[0] = id;...
  7. Queues, Nodes and passing instances of a class

    I've got a question concering how to pass instances of a class through nodes/queues.

    My question deals with arrays. When I push an instance of class on to my queue and then proceed to pop that...
  8. Replies
    5
    Views
    1,917

    I'm having issues with the replace method. When I...

    I'm having issues with the replace method. When I include it in the below code, it compiles fine, but when I reach that section of code when I run the program, it mysteriously aborts...

    Anyone...
  9. Replies
    5
    Views
    1,917

    Replacing and finding chars in a string

    I'm looking to find out how to find characters in one string and replace characters in another string with the same character in the same position as the ones that were found in the first string...
    ...
  10. Replies
    3
    Views
    2,868

    Now I get an error when I call the method: ...

    Now I get an error when I call the method:



    wof2.cpp:47: warning: cannot pass objects of type `string' through `...'

    wof2.cpp:47: warning: cannot pass objects of type `string' through `...'
  11. Replies
    3
    Views
    2,868

    Passing Strings by Reference

    I'm having some trouble passing strings by reference.

    Below is some code:



    int guessConsonant(string,string&); //function prototype
    ...
    ..
    .
  12. Replies
    5
    Views
    1,415

    Passing objects

    I'm having trouble passing objects to other functions. What are the guidlines for passing objects? Thanks.
  13. Thread: String help

    by xshapirox
    Replies
    2
    Views
    862

    String help

    How do you create a string from a character array?

    Better yet, how do you read from a line from a file and then assign that line to a string? The getline method from the ifstream class requires a...
  14. Replies
    14
    Views
    3,360

    Also, apparently I found out I'm supposed to just...

    Also, apparently I found out I'm supposed to just be able to type "make" and it will make my make file; however, this does not happen. Instead I get: "make: *** No targets specified and no makefile...
  15. Replies
    14
    Views
    3,360

    Could it be how I'm "making" my make file? ...

    Could it be how I'm "making" my make file?

    from the prompt I type:


    make makefile


    also, becuase I'm trying desperately to get this done asap, I try doing this too
  16. Replies
    14
    Views
    3,360

    Nah dude, works beautifully when I do that...

    Nah dude, works beautifully when I do that...
  17. Replies
    14
    Views
    3,360

    Does this look any better. It still doesn't...

    Does this look any better. It still doesn't work...



    # Makefile for Stack program

    all: calc

    calc: Stack.o calc.o
    g++ stack.o calc.o
  18. Replies
    14
    Views
    3,360

    I get undefined reference errors dealing with the...

    I get undefined reference errors dealing with the Stack class that I have.
  19. Replies
    14
    Views
    3,360

    Need help with Makefile

    For some reason when I try to use a makefile with a program of mine, it won't compile. However, when I compile it from the command line it works fine...

    Here is the code for my makefile



    #...
  20. Replies
    2
    Views
    1,660

    Man, I can't believe I didn't see that... I did...

    Man, I can't believe I didn't see that... I did this kind of loop all the time and Java... it's too early to be programming man.
  21. Replies
    2
    Views
    1,660

    Logical Operator not working?

    For some reason, the below code will not work (ie, the loop will not break out if either a 'Q' or 'q' is entered for line).



    numelms = 81;
    char line[numelms];

    while (*line != 'Q' || * line...
  22. Replies
    3
    Views
    1,006

    C++ Programming: Mac - Help!

    Yeah, so I have a c++ assignment due on monday and I want/need to work on it now, problem being that I'm also at a recording studio recording a demo with my band and the only available computing...
  23. Replies
    6
    Views
    1,724

    This sounds stupid but... how did you compile it?...

    This sounds stupid but... how did you compile it?

    I'm doing : "g++ Test.cpp Stack.cpp" and it compiles fine, but when I try to make some sort of executable out of it, I get the Undefined Reference...
  24. Replies
    6
    Views
    1,724

    I wish I could but I can't... Could it be a...

    I wish I could but I can't... Could it be a problem with how I'm linking files together?

    Here is my make file:



    # Makefile for Stack program

    all: main
  25. Replies
    6
    Views
    1,724

    Undefined Reference

    I'm having problems with Undefined Reference. Posted below is my code:



    /* Stack.h - Stack Specification */
    #include <stdlib.h>

    #ifndef STACK_H
    #define STACK_H
    struct StackNode
Results 1 to 25 of 28
Page 1 of 2 1 2