Search:

Type: Posts; User: akira181

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    17
    Views
    2,751

    I never said I didn't try your bit of code, I...

    I never said I didn't try your bit of code, I just said it wouldn't work for some parts. The enter choice is just there to illustrate things and is not the actual prompting, there are other things...
  2. Replies
    17
    Views
    2,751

    well its not really stupid if you actually read...

    well its not really stupid if you actually read all of my post prior to daves. I said in other parts I use it to save the input to an array. No mention of a number there or even a switch function,...
  3. Replies
    17
    Views
    2,751

    I get you on the variables. fgets still...

    I get you on the variables.

    fgets still doesn't work, it still messes up my switch function by performing the default before the user inputs anything and citizen's bit won't work in some parts of...
  4. Replies
    17
    Views
    2,751

    There's two things with that though I don't...

    There's two things with that though

    I don't fully understand the numeric_limits<streamsize>::max() bit, are they variables or library functions?

    Also, seeing as its still using cin, i'm...
  5. Replies
    17
    Views
    2,751

    just noticed that one of ma switch bits uses...

    just noticed that one of ma switch bits uses integers for the variable so am I right in saying fgets() can't be used seeing as you define the size of the string in it?

    I know this doesn't matter...
  6. Replies
    17
    Views
    2,751

    I've read the bit on fgets() in the faq, but I...

    I've read the bit on fgets() in the faq, but I find it a little confusing as I don't understand pointers. I only started teaching myself this language 3 weeks ago so I'm struggling with functions...
  7. Replies
    17
    Views
    2,751

    Simple Gets() problem

    the problem I'm having with the gets function is that it seems to already have some value pre-stored before it runs for the first time. This wouldn't normally be a problem but it messes up ma switch...
  8. Thread: VOID loops

    by akira181
    Replies
    24
    Views
    2,671

    thank you very much, int& choice was what I was...

    thank you very much, int& choice was what I was missing. Working perfectly now :) One small question though, why int& and not just int?
  9. Thread: VOID loops

    by akira181
    Replies
    24
    Views
    2,671

    I'm not following you I'm afraid, how would I go...

    I'm not following you I'm afraid, how would I go about doing this?

    *edit*

    I think I get it now, I'll give it a try and see what happens
  10. Thread: VOID loops

    by akira181
    Replies
    24
    Views
    2,671

    I see, Richie T got a post in before me and I...

    I see, Richie T got a post in before me and I didn't notice it. I understand my error but this brings good news and bad news.

    Good news is that my loop now terminates when its supposed to, bad...
  11. Thread: VOID loops

    by akira181
    Replies
    24
    Views
    2,671

    I still see no reason for the loop not to...

    I still see no reason for the loop not to terminate. Putting return 0 in the main switch cases works, although not the proper way to do it, I guess it'll have to do for now cause I'm completely...
  12. Thread: VOID loops

    by akira181
    Replies
    24
    Views
    2,671

    even when I change it to while (choice != 8 ||...

    even when I change it to while (choice != 8 || choice != 9); both options do not close the program. Here's what I've done in my save loop, cause it is slightly different from before.



    // SAVE...
  13. Thread: VOID loops

    by akira181
    Replies
    24
    Views
    2,671

    ahhhhh, this problem has come back to haunt me...

    ahhhhh, this problem has come back to haunt me again. The program is not closing now. It seems the main do loop is lasting forever. here's what I've got:



    int main(int argc, char* argv[])
    {...
  14. Replies
    6
    Views
    1,284

    lol, I know my coding is very messy and I'm just...

    lol, I know my coding is very messy and I'm just making problems for myself but I'm new to this language so I am unsure of the best way to do things, such as this std::string. I'm not too sure what...
  15. Replies
    6
    Views
    1,284

    I've just realised that cin and scanf both asks...

    I've just realised that cin and scanf both asks for a user input, so thats why it is needing two inputs before it moves onto the next screen. My problem is now that I cannot use the same bit of code...
  16. Replies
    6
    Views
    1,284

    the mistakes in my code do not exist in my actual...

    the mistakes in my code do not exist in my actual program. I hand typed that because it was easier that way to cut stuff down than to copy and paste it. The text "Enter Price: " is not in brackets...
  17. Replies
    6
    Views
    1,284

    loop not terminating

    I've got a program where the user can add items to an array. All the sections of the array are error checked to make sure the user inputs numbers or letters when they are supposed to.

    The problem...
  18. Thread: VOID loops

    by akira181
    Replies
    24
    Views
    2,671

    cheers, got it working now thanks.

    cheers, got it working now thanks.
  19. Replies
    2
    Views
    1,109

    updating an array problem

    While trying to incorporate an error check to an update list function, the problem is that the list doesn't update. If the updated stock number that you enter is not a number, or another item of...
  20. Thread: VOID loops

    by akira181
    Replies
    24
    Views
    2,671

    hi again. This is what I've done so far, its...

    hi again. This is what I've done so far, its close to working. The loop is just not ending.

    This is what I've done:


    // SAVE STOCK DETAILS TO A TEXT FILE
    void save_items( int numitems)
    { ...
  21. Thread: VOID loops

    by akira181
    Replies
    24
    Views
    2,671

    this is so much more confusing than programing in...

    this is so much more confusing than programing in basic lol. this is what I've done so far


    do {
    bool KeepInLoop = true;
    while ( KeepInLoop )
    {
    ...
  22. Thread: VOID loops

    by akira181
    Replies
    24
    Views
    2,671

    sorry if I'm being slow here but I'm not 100%...

    sorry if I'm being slow here but I'm not 100% sure I understand that. C++ is still a step up from what I'm used to. What I've done so far is put your bool in my do loop before the switch statement....
  23. Thread: VOID loops

    by akira181
    Replies
    24
    Views
    2,671

    That makes my search function a little easier to...

    That makes my search function a little easier to understand at first glance, so I'll probably use that, thanks.

    My problem still exists though,



    case 'n':
    ...
  24. Thread: VOID loops

    by akira181
    Replies
    24
    Views
    2,671

    VOID loops

    I've got a problem and I'm wondering can this be done.

    I've written a program that has a menu list and one of the options is to quit and save. the save option is contained in a VOID and the menu...
  25. Replies
    5
    Views
    1,028

    got another question, wonder can anyone help with...

    got another question, wonder can anyone help with it

    Currently, the save function asks for the filename, tells you what you entered then saves it.

    Instead of it just telling you what filename...
Results 1 to 25 of 27
Page 1 of 2 1 2