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

Search:

Type: Posts; User: s123456

Search: Search took 0.02 seconds.

  1. Replies
    9
    Views
    2,168

    Re: else/if statements help

    @VictorN
    What I ment was that i was tired and frustrated so I decided to come to this forum for help....I meant I was too busy trying to add code when instead I should have made it shorter...thank...
  2. Replies
    9
    Views
    2,168

    Re: else/if statements help

    @GCDEF
    sorry i didnt understand your comment but i see it now
    "Do all the calculations to figure out the next date, but don't output until you're done figuring out all three fields"

    in...
  3. Replies
    9
    Views
    2,168

    Re: else/if statements help

    i'm glad you are all on the same page
    why didnt anyone suggest less code?
    i posted the question late last night .. i was tired...it was a trivial question but i decided to ask for advice
    i was too...
  4. Replies
    9
    Views
    2,168

    else/if statements help

    assuming everything else works...i'm having trouble with the output...the if else statements are driving me crazy. it is outputting the date twice when i enter 7/3/12
    code displays todays...
  5. Replies
    7
    Views
    1,867

    Re: Save and Read struct help? binary file

    file.open("f:\\critters.bin", ios::in | ios::binary);

    file.read(reinterpret_cast<char*>(&yourCat), sizeof(struct Cat));
    for(int i = 0; i< 4;i++)
    { cout << setw(10) << left << yourCat.name...
  6. Replies
    7
    Views
    1,867

    Re: Save and Read struct help? binary file

    You said to put the read statement inside the loop ...it didn't work...so I need help making it work
  7. Replies
    7
    Views
    1,867

    Re: Save and Read struct help? binary file

    like this?


    for(int i = 0; i< 4;i++)
    { cout << file.read(reinterpret_cast<char*>(&yourCat), sizeof(struct Cat));
    cout << setw(10) << left << yourCat.name << "\t";
    cout << yourCat.age...
  8. Replies
    7
    Views
    1,867

    Save and Read struct help? binary file

    here is my code:

    /////////////////////////////////////////////struct

    #include <iostream>
    #include <string>
    #include <fstream>
    using namespace std;
    struct Cat
    {
Results 1 to 8 of 8





Click Here to Expand Forum to Full Width

Featured