Hello Fellas I was working with a C++ programming book and I've been working through the chapters and i came across an assignment i decided to tackle. For some reason i keep having problems, I had been working on this assignment for a while and the reason i chose this assignment is because i've seen a lot of posts online talking about this assignment and I was wondering if you guys could explain to me what i am doing wrong. Thanks in advance.
Here is the Implementation File and what i'm trying to accomplish is this: creating a class that is dayType and be able to print the day, set the day, return the next and previous days and have constructors to be able to do so and then test it with the main method to show everything as usual.
dayType test(1); //making an object of class
test.printDay(); //just trying to get it to print the correct output
cout << test.getDay(); //always prints garbage
i've been experimenting with this forever and for some reason i can't get it to work right any help would be appreciated. Thanks.
Ha! very stupid mistake on my part. I should have known that! Thank you very much Guestgulkan for pointing that out for me i been banging my head for a while now cause i knew the rest was right but i was so puzzled why that wasn't working. I really appreciate your help :)