Thread: AnsiString to number? conversion problems (using borland builder)

  1. #1
    Registered User darketernal's Avatar
    Join Date
    Sep 2001
    Posts
    41

    AnsiString to number? conversion problems (using borland builder)

    I am having a world of problems of what i thought to be rather simple.

    Edit1->Text = "123401278034987120478102873401982734";

    Now Edit1->Text is an AnsiString

    and i would like to format this to a number value, so that i can say.

    CSpinEdit1->Value = "123401278034987120478102873401982734"

    In other words transferring the value from Edit1->Text to CpinEdit1->Value;

    Integers won't work because the number is to big. So i tried going from String to Number like in this article
    Converting numbers to strings and string - C++ Articles

    But that won't work because its an Ansistring, how would i go about this conversion?

  2. #2
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    You would need some sort of "big integer" library.

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  3. #3
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    The most important question is:
    What data type is "CSpinEdit1->Value"?
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  4. #4

  5. #5
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    Figures.

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 10-03-2006, 04:48 PM
  2. THE END - Borland C++ Builder, Delphi, J Builder?
    By Davros in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 02-28-2006, 11:23 PM
  3. Using Borland C++ builder 5
    By |2yan in forum C++ Programming
    Replies: 9
    Last Post: 09-13-2004, 07:56 AM
  4. THE END (of Borland C++ Builder)?
    By Davros in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 04-07-2004, 08:00 AM
  5. Borland C++ Builder?
    By cozman in forum C++ Programming
    Replies: 7
    Last Post: 01-20-2002, 01:59 AM