Error: Must Use C++

This is a discussion on Error: Must Use C++ within the C++ Programming forums, part of the General Programming Boards category; Whats with the error: must use c++ for header iostream.h? What do i do?...

  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,675
    Also, does your source file have a ".C" or a ".CPP" extension? If it's ".C", then change it.
    I used to be an adventurer like you... then I took an arrow to the knee.

  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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21