November 3rd, 2012, 05:06 PM
@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...
November 2nd, 2012, 10:28 PM
@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...
November 2nd, 2012, 07:52 PM
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...
November 2nd, 2012, 01:17 AM
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...
October 18th, 2012, 05:27 PM
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...
October 16th, 2012, 04:58 PM
You said to put the read statement inside the loop ...it didn't work...so I need help making it work
October 16th, 2012, 03:23 PM
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...
October 15th, 2012, 03:28 PM
here is my code:
/////////////////////////////////////////////struct
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
struct Cat
{