Große Listen in C++ [] (Große Listen in C++), Lektion, page 722686
https://www.purl.org/stefan_ram/pub/grosse_listen_c++ (permalink) is the canonical URI of this page.
Stefan Ram

Große Zahlenlisten in C++ 

Teilnehmerfrage: Wie kann man Zahlenlisten mit Milliarden von Zahlen in C++  verarbeiten?

main.cpp
#include <iostream>
#include <ostream>
#include <deque>
#include <locale>
#include <iomanip> int main()
{ struct with_grouping : ::std::numpunct< char >
{ protected:
virtual char do_thousands_sep () const override { return '.'; }
virtual ::std::string do_grouping () const override { return "\03\03"; }};
with_grouping with_grouping{};
::std::cout.imbue( ::std::locale( ::std::cout.getloc(), &with_grouping ) ) ;
::std::deque< char >d; unsigned long long l;
try{ for( l = 0;; ++l )d.push_back( 0 ); }
catch( ... ){ ::std::cout << "l = " << l << "\n"; }}
::std::cout
l = 2.044.339.711
main.cpp
#include <iostream> /* ::std::cerr            */
#include <ostream> /* << */
#include <new> /* ::std::set_new_handler */
#include <deque> /* ::std::deque */
#include <cstddef> /* ::std::abort */ unsigned long long l = -1; void f(){ ::std::cerr << l << '\n'; ::std::abort(); } int main(){ ::std::set_new_handler( f );
::std::deque< char >d; for( l = 0;; ++l )d.push_back( 0 ); }

About this page, Impressum  |   Form for messages to the publisher regarding this page  |   "ram@zedat.fu-berlin.de" (without the quotation marks) is the email-address of Stefan Ram.   |   A link to the start page of Stefan Ram appears at the top of this page behind the text "Stefan Ram".)  |   Copyright 1998-2014 Stefan Ram, Berlin. All rights reserved. This page is a publication by Stefan Ram. relevant keywords describing this page: Stefan Ram Berlin slrprd slrprd stefanramberlin spellched stefanram722686 stefan_ram:722686 Große Listen in C++ Stefan Ram, Berlin, and, or, near, uni, online, slrprd, slrprdqxx, slrprddoc, slrprd722686, slrprddef722686, PbclevtugFgrsnaEnz Erklärung, Beschreibung, Info, Information, Hinweis,

Copyright 1998-2014 Stefan Ram, Berlin. All rights reserved. This page is a publication by Stefan Ram.
https://www.purl.org/stefan_ram/pub/grosse_listen_c++