How do I initialize a variable bigger than a double?

This is a discussion on How do I initialize a variable bigger than a double? within the C++ Programming forums, part of the General Programming Boards category; I want to make a maths program for college but I need some of my variables to havea greater accuracy ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Location
    England
    Posts
    121

    How do I initialize a variable bigger than a double?

    I want to make a maths program for college but I need some of my variables to havea greater accuracy than a double can offer. They have to be numerical and capable of understanding decimals. I'm sure this can be done but I dont know how?

    Thanks

  2. #2
    Registered User *pointer's Avatar
    Join Date
    Oct 2001
    Posts
    74
    Try using a long double.
    pointer = NULL

  3. #3
    Unregistered
    Guest
    If that still isn't big enough you can create your own class based on a list/array of int/char overloading all the math operators in addition to the routine variety of constructors, assignment operators, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Classes: adding a new variable produces errors
    By drunkuilled in forum C++ Programming
    Replies: 2
    Last Post: 04-30-2009, 12:58 PM
  2. Need some help...
    By darkconvoy in forum C Programming
    Replies: 32
    Last Post: 04-29-2008, 04:33 PM
  3. Storing int and double type values under one variable name
    By Thanuja91 in forum C++ Programming
    Replies: 10
    Last Post: 10-30-2007, 05:15 AM
  4. How accurate is the following...
    By emeyer in forum C Programming
    Replies: 22
    Last Post: 12-07-2005, 12:07 PM
  5. error message, what does it mean?
    By Shy_girl_311 in forum C++ Programming
    Replies: 5
    Last Post: 11-09-2001, 09:54 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21