954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how do i use math class .net library class

I wish to use the round() function in the math class of the .net framework class library

[C++]

Math::Round(3.44, 1); //Returns 3.4.
Math::Round(3.45, 1); //Returns 3.4.
Math::Round(3.46, 1); //Returns 3.5.


Ive tried just using the above, but the namespace specifier isn't working. Do i need to inclue a header file. I have little experience in using the .NET framework library, your help will be much appreciatec

mattcplusplus
Newbie Poster
11 posts since Oct 2004
Reputation Points: 10
Solved Threads: 0
 

Use

System::Math::Round(3.44, 1);

INTEL

Intel
Light Poster
30 posts since Feb 2005
Reputation Points: 10
Solved Threads: 1
 

be sure to use the header

hope this helps. good luck!

Glued

Glued
Newbie Poster
15 posts since Feb 2005
Reputation Points: 11
Solved Threads: 0
 

>hope this helps.
It doesn't. First, isn't a valid C++ header anymore. Second, the correct header, , has nothing to do with the .NET framework.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 
>hope this helps. It doesn't. First, isn't a valid C++ header anymore. Second, the correct header, , has nothing to do with the .NET framework.

ok so i am junior programmer in high school. missed the .NET part. shoot me!

Glued
Newbie Poster
15 posts since Feb 2005
Reputation Points: 11
Solved Threads: 0
 

>ok so i am junior programmer in high school.
I don't care. I know people in junior high who really know their stuff. How old you are makes no difference.

>missed the .NET part.
That I can understand, but it doesn't change my response.

>shoot me!
I did, and a better reaction would be to thank me for informing you of the mistake rather than getting defensive.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

>ok so i am junior programmer in high school. I don't care. I know people in junior high who really know their stuff. How old you are makes no difference.

>missed the .NET part. That I can understand, but it doesn't change my response.

>shoot me! I did, and a better reaction would be to thank me for informing you of the mistake rather than getting defensive.

good, maybe you can get one of those students and they can tutor me.
i'm sorry i was not getting on the defense. i made a mistake and and realized i did. i like to be humerous with some of my statements and ment no disrespect. i'm not much of an e-thug so i'm just gonna drop it. good luck to you in the future.

Glued
Newbie Poster
15 posts since Feb 2005
Reputation Points: 11
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You