Search:

Type: Posts; User: ChristianTool

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    1,014

    Thanks, I'll give it a shot. I'm not quite to...

    Thanks, I'll give it a shot. I'm not quite to the point where I can test it, because I'm still transfering things from the RentalSystem to main, cleaning it up in functions, etc; the dirty work. ...
  2. Replies
    8
    Views
    1,014

    Yes, they all derive from Car. My plan was to do...

    Yes, they all derive from Car. My plan was to do something like



    Car* newCar = 0;
    if ( type == ECONOMY )
    {
    newCar = new Economy;
    Rental.AddVehicle ( newCar );
    }
  3. Replies
    8
    Views
    1,014

    Come to think of it, I don't think I need to...

    Come to think of it, I don't think I need to create an instance of NewCar. Something like this would be better, right?



    if ( type == ECONOMY )
    {
    Economy* AddCar =...
  4. Replies
    8
    Views
    1,014

    Based on an instructor's suggestion, I'm going to...

    Based on an instructor's suggestion, I'm going to parse the command file in main as opposed to the RentalSystem class. So at this point, what I'm trying to do is simply read in the car type from the...
  5. Replies
    8
    Views
    1,014

    Template Problem

    Okay here's my dillema. I'm creating a class template, called RentalSystem. This RentalSystem is supposed to accept either a Car class or a Motorcycle class, with each having 3 derived classes for...
  6. The compiler threw a warning at me for trying...

    The compiler threw a warning at me for trying that.



    RentalSystem.cpp: In member function `void
    RentalSystem<T>::ReadCommands(std::vector<type, std::allocator<type> >&,
    ...
  7. hk_mp5kpdw, my fault, they were warnings, not...

    hk_mp5kpdw, my fault, they were warnings, not errors. I understand that the warning is telling me that it's trying to compare unsigned and signed ints. I tried declaring i as simply:


    unsigned...
  8. Compiler Error: Unsigned vs Signed Integer Expression

    RentalSystem.cpp:357: warning: comparison between signed and unsigned integer expressions

    I have a number of these errors in basically the same situation. Line 357 is :



    for ( i = 0; i <...
  9. Replies
    2
    Views
    1,381

    Used something similar and it works great. Done...

    Used something similar and it works great. Done my project 2 hours before the due date, and I didn't even procrasinate. What a mess =D. Thanks a bunch.
  10. Replies
    2
    Views
    1,381

    Question regarding the fill function.

    I was wondering how to use the fill function to place leading 0's before my integer value, provided it's not of a certain size. In the program I'm writing, I'm supposed to accept a membership card...
  11. Replies
    6
    Views
    1,278

    I'm having a problem with the following code: ...

    I'm having a problem with the following code:


    NODEPTR curr, temp;
    curr = (*headPtr);

    while ( curr != NULL )
    {
    curr -> data = Dequeue ( headPtr, tailPtr );
    temp =...
  12. Replies
    6
    Views
    1,278

    That's some seriously confusing code. In...

    That's some seriously confusing code.

    In your declaration, you wrote T stack1[SIZE]; T stack2[SIZE]; etc.
    Wouldn't that be declaring it as a stack with array implementation? Because I can't...
  13. Replies
    6
    Views
    1,278

    Trouble with Linked List Stacks

    I've created a program where I read in a certain amount of data from an input file, place it in a queue, and then I'm supposed to split the information between 4 different stacks. I've been provided...
  14. Replies
    19
    Views
    7,603

    You're absolutely right, I read it wrong :p

    You're absolutely right, I read it wrong :p
  15. Replies
    19
    Views
    7,603

    One last question. Should the following code...

    One last question. Should the following code work to determine the number of words in a string? I.e. I'm assuming all words are seperated by spaces.



    for( i = 0; i < strLen; i++ )
    {
    ...
  16. Replies
    19
    Views
    7,603

    That's working great. Now all I have to do is...

    That's working great. Now all I have to do is write functions to determine the number of vowels, characters, and words, as well as one to test if it's a palindrome or not. Then, I'll be all set =D
  17. Replies
    19
    Views
    7,603

    I did that. I'm not familiar with fflush, so I...

    I did that. I'm not familiar with fflush, so I don't know what to expect but I didn't see any change.
  18. Replies
    19
    Views
    7,603

    Tried that. Didn't seem to have any effect.

    Tried that. Didn't seem to have any effect.
  19. Replies
    19
    Views
    7,603

    So strArray has to be initialized in main? ...

    So strArray has to be initialized in main?

    Edit: It compiles cleanly, no warnings/errors.
  20. Replies
    19
    Views
    7,603

    I get the follow results when I run the program:...

    I get the follow results when I run the program:


    strArray[13] - A man, a plan, a cat, a canal: Panama?

    Please select which string you'd like to analyze, or 0 to quit.
    0
    Segmentation fault...
  21. Replies
    19
    Views
    7,603

    Here's my main file #include ...

    Here's my main file


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <ctype.h>
    #include "pal.h"

    int main( int argc, char* argv[] )
  22. Replies
    19
    Views
    7,603

    Here's my pal.c file #include ...

    Here's my pal.c file


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <ctype.h>
    #include "pal.h"

    /* Display greeting message */
  23. Replies
    19
    Views
    7,603

    I found I had a semicolon right after my for loop...

    I found I had a semicolon right after my for loop which was obviously a mistake, but that wasn't causing the seg fault. I have to think it's from that since it doesn't make it to my probe statement...
  24. Replies
    19
    Views
    7,603

    Very odd segmentation fault/core dump.

    So I'm pulling out my hair here, as I can't figure this out. I'm getting a segmentation fault ( core dump) in my program and I don't understand why. It's a clean compile and when I run the program...
  25. Replies
    12
    Views
    2,669

    I'm sorry, I'm not trying to sound redundant. ...

    I'm sorry, I'm not trying to sound redundant. I'm just new to trying to work with an array of strings of a dynamic size. I can't seem to find an online resource, anything in my text book, etc. to...
Results 1 to 25 of 39
Page 1 of 2 1 2