Search:

Type: Posts; User: DHart07

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thanks a ton guys, everything works as planned. ...

    Thanks a ton guys, everything works as planned. Thanks for the help and helping me understand everything. I greatly appreciate the time spent. Here is my nearly final code.



    #include...
  2. Alright, so far that makes sense but I am unsure...

    Alright, so far that makes sense but I am unsure of the syntax for atoi(). Here is my code for that part.



    while(! inStream.eof())
    {
    getline(inStream, getNumbers);
    istringstream...
  3. "Easier still, you can simply load each string...

    "Easier still, you can simply load each string containing an entire row (including its commas) into the stringstream, then use getline() using the comma delimiter to read from that stringstream into...
  4. homework help wanted: reading a comma seperated file

    Hello, I'm working on an assignment where we are using file i/o. The goal of the assignment is to read numbers that are seperated by commas in a 2 column x 20 row excel file. I am currently stuck...
  5. Yeah, the layout of everything is a bit of a...

    Yeah, the layout of everything is a bit of a mess, I appologize. The assignment is in two parts, where the first one is just the basic pizza class and I meant to leave the pizza::takeOrder out, but...
  6. In other words change my function calls to...

    In other words change my function calls to versions of this...

    customer[numberOfPizzas].setSize(newSize);

    If I do that I get an error at that line saying that the vector subscript is out of...
  7. homework assistance wanted: using a class as a vector

    I'm trying to create a pizza ordering system that consists of 2 classes. The first one contains all the information for a pizza, while the second consists of an order system for multiple pizzas. ...
  8. No, I always like to look at other people's code...

    No, I always like to look at other people's code to see how their logic deciphered it. I added the i > 0 check before I read your post so my above code is more or less my final code with the added...
  9. i = 0; //reset counter for new condition int j =...

    i = 0; //reset counter for new condition
    int j = 0; //counter for corrected tempString


    for(i; i < size + 2;)
    {
    if((userString[i] != ' ') && (userString[i - 1] == ' '))
    {
    if(j == 0)
    ...
  10. Thanks again for the help guys. This is what I...

    Thanks again for the help guys. This is what I currently have, and it works, but I still want to clean it up a bit.


    i = 1; //reset counter for new condition
    int j = 1;
    tempString[0] =...
  11. That is what I was trying to do with my i2...

    That is what I was trying to do with my i2 variable as this notes how many spaces were skipped, at least that was my intention. I understand the shorter string is my tempString and my longer, and...
  12. Another note, my logic is off when there is more...

    Another note, my logic is off when there is more than just 2 spaces as it doesn't know how many are going to be there so it can't just add whatever is next. If there is a group of 3 spaces then I...
  13. Good call on the missing conditions, saw that and...

    Good call on the missing conditions, saw that and felt like a dumb ass. We haven't went over flags yet and our book does a pretty vague job on the whole thing. I don't have a lot of faith in the...
  14. homework help wanted: removing multiple spaces from array

    I'm having some trouble with my problem in which I'm supposed to take a character array from the console and manipulate it to read correctly using cstrings and a class. Everything works as intended...
  15. Well on a positive note, what you suggested...

    Well on a positive note, what you suggested works. I understand the syntax now that it worked, before I must have typoed something because it didn't work and it left me lost. The homework isn't due...
  16. If I were to use the strcmp what would my syntax...

    If I were to use the strcmp what would my syntax be for the input in the constructor? And why are they all == 0? I don't follow the logic.

    The assignment is to have an overloaded constructor...
  17. I would love to use a string...but those aren't...

    I would love to use a string...but those aren't covered until next chapter :( so that still kind of leaves me in the dark. I was originally trying to take input from the console, but that just...
  18. homework help - overloaded constructor taking char or int

    The whole point of the homework is to test an overloaded constructor. If I manually put an int into the constructor it works and I get the correct result BUT I cannot figure out how to get it to...
  19. Replies
    16
    Views
    4,733

    Point well taken. Thanks for all the help, its...

    Point well taken. Thanks for all the help, its greatly appreciated. My program works correctly, and seemingly to myself effeciently, so I'm calling it finished. Thanks again.
  20. Replies
    16
    Views
    4,733

    Everything you said makes perfect sense now. I...

    Everything you said makes perfect sense now. I think I'm finally starting to understand. My current program is pretty much everything I listed last time, except that I did switch around my get and...
  21. Replies
    16
    Views
    4,733

    Thanks for all of the help, I really appreciate...

    Thanks for all of the help, I really appreciate it. Here is a copy of my "final" and hopefully properly working code. I get no errors and no warnings and my answers come out correct every time I...
  22. Replies
    16
    Views
    4,733

    I read through my text and various online sources...

    I read through my text and various online sources and understand encapsulation. I guess my fault is in how to construct the mutator and accessor functions. I know I can just take the userRadius...
  23. Replies
    16
    Views
    4,733

    The thing that I never 100% understood was why...

    The thing that I never 100% understood was why the SET and GET functions have to be seperate. I don't understand why you can't just have one function to do both. We're supposed to use corresponding...
  24. Replies
    16
    Views
    4,733

    So in other words my setRadius and getRadius...

    So in other words my setRadius and getRadius functions are backwards? It makes sense in the sense that my program runs but when I try to pass my userRadius value into set it gets lost after the...
  25. Replies
    16
    Views
    4,733

    homework help wanted - Class member functions

    I'm in my 201 programming class and we have an assignment dealing with a class. I have a decent handle on everything so far, but right now I'm stuck with my code and I'm hung up on my class member...
Results 1 to 25 of 37
Page 1 of 2 1 2