Results 1 to 4 of 4

Thread: iostream

  1. #1

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650

    iostream

    i have this in my code :

    #include <iostream.h>;

    but it says there is an error and wont compile, does anyone know why?

  2. #2
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024
    You don't need the ; after the >
    Also depending on your compiler you don't need the .h for the iostream
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


  3. #3
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    FWIW:
    the ; is considered NULL line and doesn't affect compilers

    for example this will compile and run just fine:
    Code:
    #include <stdio.h> ;
    
    int main(){
    
        int i;;;;
        printf("hi there\n");;;;;;;;;
        return 0;;;;;;;;;;
        }

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Basically you should include
    <iostream>
    on any compiler younger than VC++5.
    This means that all elements are wrapped in the std namespace, beware!
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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