Thread: Error: Must Use C++

  1. #1
    Student drdroid's Avatar
    Join Date
    Feb 2002
    Location
    Montreal, Quebec
    Posts
    669

    Error: Must Use C++

    Whats with the error: must use c++ for header iostream.h? What do i do?

  2. #2
    Registered User matheo917's Avatar
    Join Date
    Sep 2001
    Posts
    279
    try to put this in your header:

    Code:
     #include <iostream>
     using namespace std;
    instead of iostream.h


    if that doesn't help then post your entire source code so i can look at it



    matheo917

  3. #3
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    Also, does your source file have a ".C" or a ".CPP" extension? If it's ".C", then change it.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  4. #4
    Student drdroid's Avatar
    Join Date
    Feb 2002
    Location
    Montreal, Quebec
    Posts
    669

    thanks..

    the second one helped... for some reason my compiler(seen below) doesn't accept using namespace std; well, thanks again. I can't wait for that c++ book to come, it should come today or tommorrow.

Popular pages Recent additions subscribe to a feed