Shun 0 Newbie Poster

This is begining to bug me. I have googled it. I have searched this site and I still have not managed to get the rounding to work the way I want!

I have done the Math::Round() deal, I have tried System::Math::Round. I got desperate and looked to see what it would do depending on which ones were capitalized. All i get while capitalized is that they aren't a class/identifier. Undercase with the system::math::round approach I get a "fatal error c1001: internal compilier error" message.

The rounding thing ain't really needed for this assignment.. but it bugs me cause it looks really sloppy as is. I suppose posting the code would not hurt-

// ex10.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
using namespace std;

int _tmain()
{
	float a;
	float b;
	float c;	

	cout << "\nPlease enter number of pounds: "; 
             cin >> a;
	cout << endl << "Please enter number of Shillings: ";
	cin >> b;
	cout << endl << "Finally, Please enter number of Pence: ";
	cin >> c;
	cout << "\nYou have entered \x9c" << a << "." << b << "." 
		<< c << endl;
	if (c>=12)
	{
		c -= 12;
		b++;
	}
	if (b>=20)
	{
		b -= 20;
		a++;
	}
	float d = (b*12 + c) / 240;
             System::Math::Round(d, 2);
	d = a + d;
	cout << "\n\n\nYou have \x9c" 
		<< d <<" pounds with the current system!" << endl 
                  << endl << endl << endl;
	system ("pause");
	return 0;
}

I imagine I am just missing something extremely stupid. And I don't need to have it... but I just get hung up on things. Once I try something I hang on tooth and nail to I get it done.

Any help would be greatly appreciated(as i said I am probably just overlooking something considering the time I have spent looking this problem up).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.