CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: spideyflygirl90

Page 1 of 2 1 2

Search: Search took 0.03 seconds.

  1. Re: Error with my running counter through loops.

    The 2 parts I have left of this program are the hardest so I may return with more questions (as in I probably will haha)
  2. Re: Error with my running counter through loops.

    @ 2kaud - Wow....that's a concept to wrap my head around....cerr.....I don't think we've learned that yet since that seemed quite overwhelming. hahaha.

    And thanks. That makes sense for the line...
  3. Re: Error with my running counter through loops.

    Another questions: I need to display my stored license plates on the screen horizontally for the user to select from. I have to do this using a loop - which I get. But how do I force the loop to...
  4. Re: Error with my running counter through loops.

    Thanks @ 2kaud I'm trying but it sure is a lot to remember!!! ;-P

    @ Paul McKenzie - we haven't learned vectors yet. We are just practicing with arrays.
  5. Re: Error with my running counter through loops.

    I figured out what I was doing wrong was declaring dataCount to 0 in the wrong function. I had it set to 0 within main so when it passed to StoreData, it started as 0, the incremented but when it was...
  6. Re: Error with my running counter through loops.

    And as per usual 2kaud, I just got it to work. Hahahaha. You must be my muse. Every time I reply to you, I seem to solve my own questions. <3
  7. Re: Error with my running counter through loops.

    @ 2kaud

    I noticed that. Our teacher is having us practice with forward declarations regardless of the location of our definitions. She said its a good practice to learn in case an employers wants...
  8. Re: Error with my running counter through loops.

    So would StoreData still be int and return dataCount? Do I then initialize dataCount to 0 within StoreData still?

    For the 1 too many, that's why I checked it dataCount < MAX not equal to. Then the...
  9. Re: Error with my running counter through loops.

    I don't want them to be size MAX. One of the things I'm writing in is an error code so that if more than 1000 entries are in the input file, an error is produced at the 1001st line. So the array is a...
  10. Re: Error with my running counter through loops.

    dataCount is initialized to 0 within StoreData. That way the arrays will start storing at index 0. Then with each iteration, dataCount is increased by 1. At the end of StoreData, I return the value...
  11. Error with my running counter through loops.

    I'm working on a program that reads data in line by line from an input file and the sorts it into two arrays, one string, one float. They are parallel arrays managed by a running data count of how...
  12. Replies
    43
    Views
    29,562

    Re: Looking for a Mentor

    minCharges() returns the variable MIN. I got the whole assignment to work though!!!
  13. Replies
    43
    Views
    29,562

    Re: Looking for a Mentor

    Here's my code (just the relevant parts - the rest is checked) but I'm obviously doing it wrong since it isn't working. Suggestions on how to fix it?


    void displayData (const int& vehicleCount,...
  14. Replies
    43
    Views
    29,562

    Re: Looking for a Mentor

    I figured that out! Hahahaha. Told you. I seem to be asking, and then figuring it out!! Makes me feel so good!!!

    However, can you possibly explain enum types to me? I'm supposed to use them in my...
  15. Replies
    43
    Views
    29,562

    Re: Looking for a Mentor

    Thanks! I keep posting questions and then figuring out how to get past them. Hahaha. I've gotten as far as writing data to my array but for some reason the loop is running 1 too many times and giving...
  16. Replies
    43
    Views
    29,562

    Re: Looking for a Mentor

    How do you break a string into different variables?

    I got openFile to work. And I've gotten getLine figured out. And my loop! Yay.

    However, my getLine is putting the whole line into a string....
  17. Replies
    43
    Views
    29,562

    Re: Looking for a Mentor

    I changed it to void openFile() since it doesn't return a value really, just a statement. Does that work? I could add inside the if(!inFile) someway to close the program?

    Also, I put openfile()...
  18. Replies
    43
    Views
    29,562

    Re: Looking for a Mentor

    I think my issue is with how I'm passing the variable from main to openFile but I'm not sure.
  19. Replies
    43
    Views
    29,562

    Re: Looking for a Mentor

    I'm stuck again, maybe someone can help ;-P

    I wrote my openFile function and tested it, worked just fine! I put a cout statement to verify that it worked. It displayed perfectly. Then I moved it...
  20. Replies
    43
    Views
    29,562

    Re: Looking for a Mentor

    Update:

    So I figured out the major reason why I was struggling so much! My computer has a bug! Ahh!! I've been needing a new laptop for school, picked it up yesterday, ran the codes I have...
  21. Replies
    43
    Views
    29,562

    Re: Looking for a Mentor

    So I'm trying to do it piece by piece, starting with opening the file. However, it's giving me an error that says "Cannot find or open the PDB file".

    Here's the very basic code I have so far. I'm...
  22. Replies
    43
    Views
    29,562

    Re: Looking for a Mentor

    Oh, I don't want you guys to write it for me! Then I'll never learn and I'll forever be stuck!!! I'm working on it now and will post some code when I get stuck...hahaha. As in, if I finish writing...
  23. Replies
    43
    Views
    29,562

    Re: Looking for a Mentor

    The assignment is teaching us to use arrays. Haha. :eek: Hahaha.

    I'm trying to get an idea of where to start before I get home from work and actually start. Haha
  24. Replies
    43
    Views
    29,562

    Re: Looking for a Mentor

    Those make a lot of sense!

    I had figured out the vehicleClass == 'A' one. But I didn't know about the else if or the int&.

    My new assignment that I'll be starting on tonight (when I'm not on a...
  25. Replies
    43
    Views
    29,562

    Re: Looking for a Mentor

    Nope. Just the next assignment. This week we are learning arrays. I've already gotten my assignment and am ready to start working on it. *deep breath* More time to work on it this week! That way I...
Results 1 to 25 of 35
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured