Thread: int

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    33

    Question int

    whats the purpose of "int" and what dose it mean, ive been reading a tutorial forever and it dosent explain y this was placed in the hello world project.
    this is my signature. k thx

  2. #2
    Jake55654
    Guest
    int is just a class indicator which indicates the superficial value within the binary mechanisms. Used properly, one may be able to write professional applications. Also, the third bit within the cort is to be set when there is a conflict within the stream of binary.

    -Jake

  3. #3
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    Or in english, it represents integer (a number). Hence, the names declared after it, are names that represent an integer. The values of the names can be changed throughout the program. However, the only problem is that int's have a limited range. Something in the 2 billions to -2 billions.

    Code:
    #include <iostream.h>
    
    int main()
    { int number;//declares the variable named number
       
       number=4;//sets the value of number to 4
       cout<<endl<<number<<endl;//will output a newline,4, than another new line
       
       number=6;//sets the value of number to 6
       cout<<number<<endl;//will output 6 than a new line
    
       cin>>number;//asks you to input a value for number
       cout<<number<<endl;//will output what you inputted than a newline
    
       return 0;
    }

  4. #4
    Registered User rmullen3's Avatar
    Join Date
    Nov 2001
    Posts
    330
    An integer is a type. It stores whole numeric values and takes up 32 bits in size. It can store data between -2147483647 and 2147483647. The maximum value unsigned is 0xffffffff.

    "ive been reading a tutorial forever and it dosent explain y this was placed in the hello world project."

    You need to find a new tutorial.

  5. #5
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Originally posted by Jake55654
    int is just a class indicator which indicates the superficial value within the binary mechanisms. Used properly, one may be able to write professional applications. Also, the third bit within the cort is to be set when there is a conflict within the stream of binary.

    -Jake
    Um, Jake, I think you lost me there.

    >Also, the third bit within the cort is to be set when there is a conflict within the stream of binary.

    Wow, I did not know that.

  6. #6
    Registered User Azuth's Avatar
    Join Date
    Feb 2002
    Posts
    236
    In terms of why this is in a 'hello world' application; you're probably talking about 'int main'. Why this is done is covered in the FAQ.
    Demonographic rhinology is not the only possible outcome, but why take the chance

  7. #7
    Registered User
    Join Date
    Jun 2002
    Posts
    33
    yes azuth, thats what im talking about.
    this is my signature. k thx

  8. #8
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    for the sake of explaination nonetheless, the int that preceeds the function name 'main' indicates the return type of the function at hand... other examples would be...

    Code:
    void foo (void);
    char blah (void);
    etc...

    oh and btw, rmullen3, you skate don't you? super kewl!
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. memory leak
    By aruna1 in forum C++ Programming
    Replies: 3
    Last Post: 08-17-2008, 10:28 PM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. getting a headache
    By sreetvert83 in forum C++ Programming
    Replies: 41
    Last Post: 09-30-2005, 05:20 AM
  4. Quack! It doesn't work! >.<
    By *Michelle* in forum C++ Programming
    Replies: 8
    Last Post: 03-02-2003, 12:26 AM
  5. easy if you know how to use functions...
    By Unregistered in forum C Programming
    Replies: 7
    Last Post: 01-31-2002, 07:34 AM