Forum: C++ Nov 16th, 2008 |
| Replies: 8 Views: 2,162 I have been working on this program for quite some time and I have gotten it to compile and execute but I am getting a Debug error - Runtime Check Failure #2 Stack around the variable... |
Forum: C++ Nov 14th, 2008 |
| Replies: 8 Views: 2,162 using std::cout;
using std::cin;
using std::endl;
#include <string>
using std::string;
#include <cstdlib>
using std::rand;
using std::srand; |
Forum: C++ Nov 14th, 2008 |
| Replies: 8 Views: 2,162 Thank you skatamatic for that suggestion on the modulus (%). Narue I realized I had omitted the <ctime> and <cstdlib> libraries. After adding them it made it easier for me to identify the other... |
Forum: C++ Nov 14th, 2008 |
| Replies: 8 Views: 2,162 Hi guys
I am working on a Lottery program to generate 6 unique numbers. So far I have the following:
CLASS LOOKS LIKE THIS:
#include "stdafx.h"
#include <string>
#include <ctime>
#pragma... |
Forum: C++ Nov 9th, 2008 |
| Replies: 6 Views: 793 [/QUOTE]
You are right Chris, the calculations do work. Apparently I overlooked the - (negative) I got for my previous calculations(when it was 9/5 and designated float).
The - (negative) is now... |
Forum: C++ Nov 9th, 2008 |
| Replies: 6 Views: 793 Chris,
Appreciate your suggestion. I tried that but got this error message:
conversion from 'double' to 'float', possible loss of data
I even converted all floats to doubles and got the same... |
Forum: C++ Nov 9th, 2008 |
| Replies: 6 Views: 793 Thank you minas1, it worked. However my calculations from centigrade to fahrenheit does not seem accurate. I will continue work on it.
Does the calculations appear accurate? If not, any... |
Forum: C++ Nov 8th, 2008 |
| Replies: 6 Views: 793 Hey guys
Need help with the following program. I keep getting compilation error
error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'void' (or there is no... |