I'm new to C++ programming and recently purchased the C++ Starter Kitfrom Sam's publishing for a C++ class I'm taking. The "kit" comes with the Borland C++ compiler v. 4.02, a book and a bunch of info on CD-ROM. The problem is I'm having trouble entering real numbers into float variables. For example:
void main ()
cout << "Enter a real number: ";
cin >> z;
cout << "The nuber is: " << z << endl;
The above program will compile and even run as long as an integer is entered. But, if a real number is entered (ie. 1.2) a run-time error "Floating Point: Overflow" occurs. I can assign real numbers in the program, but not enter them from the terminal. Even more strange is that I installed the compiler on my laptop and the program runs fine.
The technical support for SAMs publishing have no idea what's going on and I think Borland charges for technical support. I suspect that there is a problem with the compiler setup. Can anyone out there helpme. My desktop has a Cyrix 6x86-100 (P120+) and the laptop an Intel