Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Using Math constants in vc++ 6

Using Math constants in vc++ 6

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vikashparida
    wrote on last edited by
    #1

    Although it sounds quite silly, I havent been able to use the math constants defined in math.h such as M_PI etc. Can anyone help me with this?

    M K 2 Replies Last reply
    0
    • V vikashparida

      Although it sounds quite silly, I havent been able to use the math constants defined in math.h such as M_PI etc. Can anyone help me with this?

      M Offline
      M Offline
      Maxwell Chen
      wrote on last edited by
      #2

      The simplest way is to define one yourself. For the pi number, pi = 3.1415926535897932384626433832795......


      Maxwell Chen

      1 Reply Last reply
      0
      • V vikashparida

        Although it sounds quite silly, I havent been able to use the math constants defined in math.h such as M_PI etc. Can anyone help me with this?

        K Offline
        K Offline
        Kamyar Souri
        wrote on last edited by
        #3

        I looked the file Math.h but there was not any Costand named M_PI. also I could not find it on MSDN! are you sure there is M_PI in any header file? Kamyar Souri Software Manager Booria CAD/CAM Systems www.booria.com

        A 1 Reply Last reply
        0
        • K Kamyar Souri

          I looked the file Math.h but there was not any Costand named M_PI. also I could not find it on MSDN! are you sure there is M_PI in any header file? Kamyar Souri Software Manager Booria CAD/CAM Systems www.booria.com

          A Offline
          A Offline
          Alexander M
          wrote on last edited by
          #4

          i think it is a linux/unix def. everytime i've seen this define it was a unix software. Don't try it, just do it! ;-)

          V 1 Reply Last reply
          0
          • A Alexander M

            i think it is a linux/unix def. everytime i've seen this define it was a unix software. Don't try it, just do it! ;-)

            V Offline
            V Offline
            vikashparida
            wrote on last edited by
            #5

            okay i think i will define my own constant rather that searching for a way to use the constant in the header file. previously i had also used it only on an unix system thanks for the help

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups