Forum: C++ Mar 21st, 2008 |
| Replies: 6 Views: 882 I'm trying to create a parking lot system where users can enter and exit a lot. This lot should be kept on a file(s). My code compiles but my data doesn't write to the actual file.
void... |
Forum: C++ Mar 20th, 2008 |
| Replies: 1 Views: 485 Problem solved, no worries. |
Forum: C++ Mar 20th, 2008 |
| Replies: 1 Views: 485 I'm trying to use composition. I included the header file and made a type of the class that is contained within the owner class but I keep getting errors like this:
What am I missing? Here's... |
Forum: C++ Mar 1st, 2008 |
| Replies: 2 Views: 909 |
Forum: C++ Mar 1st, 2008 |
| Replies: 2 Views: 909 I'm trying to write a program with a has-a relationship but the initialization isn't working. The error I'm getting is:
Licenses::Licenses(int id, string name, string ad, Date, Date)... |
Forum: C++ Feb 29th, 2008 |
| Replies: 4 Views: 827 That is the situation I was describing yes but to implement it in my UML diagram would be illogical so it doesn't make sense to use this method. But I know it will work if I do need this in an actual... |
Forum: C++ Feb 29th, 2008 |
| Replies: 4 Views: 827 Thanks for clearing that up but looking deeper into the issue that solution would not solve my problems anyway. |
Forum: C++ Feb 29th, 2008 |
| Replies: 4 Views: 827 I'm trying to design my UML diagram but I'm not sure about something.
If I have a derived class that belongs to two other classes will the two other classes inherit the features of the base class?... |
Forum: C++ Feb 22nd, 2008 |
| Replies: 1 Views: 474 I'm working c++ project but before I can start coding I am required to analyze the problem and determine potential objects/classes - Object Orientated Analysis.
I read through the paper a few... |
Forum: C++ Feb 21st, 2008 |
| Replies: 2 Views: 490 Click here for the formula.
http://www.daniweb.com/forums/post541981-9.html |
Forum: C++ Feb 21st, 2008 |
| Replies: 8 Views: 856 Pay close attention to the comments.
//#include <cstdlib> This library is not apllicable for your needs
// http://www.cplusplus.com/reference/clibrary/cstdlib/
// Follow the link for more... |
Forum: C++ Feb 21st, 2008 |
| Replies: 9 Views: 1,101 A closer look at my rand() and some debugging revealed it to be flawed. This is a working formula for rand:
rand () % (high - low + 1) + low;
Lines 68, 74, and 79 does the job but 1 (ONLY ONE)... |
Forum: C++ Feb 20th, 2008 |
| Replies: 9 Views: 1,101 Programming takes reading and plenty of practice!
Before you even open the compiler spend 2 minutes reading through the question and 3 minutes analyzing it. While analyzing ask yourself:
What... |
Forum: C++ Feb 19th, 2008 |
| Replies: 9 Views: 1,101 I'm not verse with posting actual code on daniweb but here goes:
//Assignment 5: Guessing game with random numbers and functions
//By Curtis Davenport 2/17/08
#include <iostream>... |
Forum: C++ Feb 17th, 2008 |
| Replies: 7 Views: 815 Making the expiry_date and issue_date public was a temp. hack just to get the program run when using those data types in main. The final solution will require they be private.
This code seems to... |
Forum: C++ Feb 17th, 2008 |
| Replies: 9 Views: 1,101 After a more thorough reading I corrected your code. The comments are in the file. Feel free to post any issues you might have. |
Forum: C++ Feb 17th, 2008 |
| Replies: 9 Views: 1,101 That should solve your problem with the rand function.
int GuessFunction(int)
{
int result;
srand( time(NULL) );
result = rand()% 99 + 1 // range for rand() = (max - min) +... |
Forum: C++ Feb 17th, 2008 |
| Replies: 7 Views: 815 Thanks for that analysis. I am fully aware of the "display_date" function in the Date class but I do not want to utilize it.
I want to use the get_exp_date and get_issue_date to display the... |
Forum: C++ Feb 17th, 2008 |
| Replies: 7 Views: 815 I don't think so, especially since I'm not using the composition to store or display my values, until now anyways, for the most part.
I've modified my code to actually use composition but I'm... |
Forum: C++ Feb 17th, 2008 |
| Replies: 7 Views: 815 I don't think so, especially since I'm not using the composition to store or display my values, until now anyways, for the most part.
I've modified my code to actually use composition but I'm... |
Forum: C++ Feb 16th, 2008 |
| Replies: 7 Views: 815 My assignment requires me to demonstrate composition in my source code. I completed my code and worked out all the bugs but at the end where I display the date, I doubt that constitutes composition.... |