Thread: cout undeclared/cin undeclared

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    4

    cout undeclared/cin undeclared

    i'm new to programming and am using djgpp i'm trying to build the common 1st program hello world... i've checked the forums for this problem i'm having and adjusted my code accordingly and am still getting the same error message:

    error: 'cout' undeclared (first use this function)
    error: (each undeclared identifier is reported only once for each function it appears in.)
    error: 'cin' undecalred (first use this function)

    heres my code:

    Code:
     
    #include <stdio.h>
    
    int main()
    {
      cout<<"HEY, you, I'm alive! Oh, and hello world!\n";
      cin.get();
    
      return 0;
    }

    i've replaced iostream with stdio.h because thats what they use on the djgpp website and after looking in my include folder i have no iostream file... makes sense to me... also i've removed the using namespace std; line becuase when i have that in there i get a whole slew of undefined reference to 'std messages... are these just compiler warnings and can/should i be removing the using namespace line like that or am i doing something stupid? hopefully i've included enough information to get help on my problem sorry for the probably simple question and i appreciate any help i can receive.

    on another note anyone else see the sabers/flyers game? that hit on umberger? wow good night gracy.
    Last edited by akbigchillin; 04-22-2006 at 08:44 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner Needs help in Dev-C++
    By Korrupt Lawz in forum C++ Programming
    Replies: 20
    Last Post: 09-28-2010, 01:17 AM
  2. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 09:15 PM
  3. Problem with cout
    By kristentx in forum C++ Programming
    Replies: 2
    Last Post: 04-16-2006, 12:37 PM
  4. 'cout' undeclared indentifier?
    By axon in forum C++ Programming
    Replies: 15
    Last Post: 09-22-2003, 03:48 PM
  5. I'm REALLY confused. Why isn't cout or cin working here?
    By niudago in forum C++ Programming
    Replies: 8
    Last Post: 02-15-2003, 05:53 PM