| | |
Rounding with Microsoft Visual Studio .NET 2003
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Sep 2005
Posts: 1
Reputation:
Solved Threads: 0
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-
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).
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-
C++ Syntax (Toggle Plain Text)
// 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).
![]() |
Similar Threads
- Using Crystal Reports XI with Visual Studio .NET 2003 (VB.NET)
- HELP PLS! with visual studio.net 2003 installation (VB.NET)
- My Visual Studio.NET won't open ASP.NET projects (ASP.NET)
- cannot to create project in Windows Server 2003 with Visual Studio.NET 2003 (ASP.NET)
- Microsoft visual studio.net 2003 edition (C++)
- template link errors in visual studio .net 2003 (C)
- Visual Studio 6.0 or Visual Studio .Net 2003 (C++)
- how to update visual studio .net 2003 (ASP.NET)
Other Threads in the C++ Forum
- Previous Thread: structs vs classes?
- Next Thread: Program keeps crashing...
Views: 3060 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets





