Thread: Data type

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Try:
    Code:
    long long x = 10000000000LL;
    printf("%lld\n", x);
    If that doesn't work, state your compiler and its version.

    EDIT:
    Wait, I just saw that you started talking about matrices. The type to consider for printf is the type of an element of the matrix, it has nothing to do with the size. The size would introduce concerns about whether you're allocating on the stack etc, but that's a different story.
    Last edited by laserlight; 05-08-2019 at 07:28 AM.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 17
    Last Post: 08-05-2018, 06:59 PM
  2. Replies: 2
    Last Post: 05-14-2011, 09:26 PM
  3. store string data as a short or other data type
    By robin2aj in forum C Programming
    Replies: 5
    Last Post: 04-07-2010, 11:02 AM
  4. data type for hex
    By cutelucks in forum C Programming
    Replies: 3
    Last Post: 04-29-2007, 07:57 PM
  5. What Data type.........
    By Nectron in forum C++ Programming
    Replies: 2
    Last Post: 07-10-2003, 06:34 AM

Tags for this Thread