CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: C++ programming

  1. #1
    Join Date
    Mar 1999
    Posts
    3

    C++ programming



    I need help getting started on writing a program. If you could please show me an example, your help will be very much appreciated.


    Question: What is the largest int value that can be represented int a 16 bit PC?

  2. #2
    Join Date
    Apr 1999
    Posts
    16

    Re: C++ programming



    the best site i know of to start learning visual c++ in particular

    (plus C++ and java...) is at


    http://devcentral.iftech.com/learning/tutorials/


    enjoy

  3. #3
    Join Date
    Mar 1999
    Posts
    17

    Re: C++ programming



    Advice for newbies in C++.


    Read Schaum's outline on C++. Cheap, quick, easy,

    lots of worked examples. Just don't let it be your

    last book, because it is by no means even close

    to complete. It will help you up the learning curve.


    You want to read the FAQs at these URLs. Pay

    attention to the further books they recommend.


    The C++ FAQ lite

    http://www.cerfnet.com/~mpcline/c++-faq-lite/index.html


    An MFC FAQ

    http://mfcfaq.stingray.com/


    And you should be able to find some good book reviews here.

    http://www.accu.org/bookreviews/publ...nner_s_c__.htm




  4. #4
    Join Date
    Apr 2001
    Posts
    13

    Re: C++ programming

    ans for ur question is 32767

    u tell me wat help u need

    Mahesh Kumar C D

  5. #5
    Join Date
    Apr 2000
    Location
    Frederick, Maryland
    Posts
    507

    Re: C++ programming

    There is general formula to find the highest and lowest no.

    For Signed no

    -2 ^ (n-1) to 2 ^ (n-1) -1

    And for signed no

    0 to 2 ^ (n) - 1

    Where ^ is power.

    According to this 16 bit int can store

    -32768 to 32767 signed no
    and
    0 to 65535 unsigned no

    Hope this helps.



  6. #6
    Join Date
    Sep 2000
    Location
    Russia
    Posts
    262

    Re: C++ programming

    There is a define in <limits.h> for max. integer - INT_MAX. (ANSI-compliant) That will be 2147483647 if integer is 32-bits wide and 32767 for 16 bits. You can e-mail me for more help


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured