Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

My VS 2008 Pro. doesn't recognize C++ headers.?

When programming in C++ with my Visual Studio 2008 Professional Edition, well, it doesn't recognize any namespace or any header other than "stdafx", which of course, isn't really cool when it comes to actually making a program. So, any suggestions about how to correct this?

N.B.

In the headers folder of any program, there are only two .h files, one of which is "stdafx.h". So, do I need to create another .h file in it for the other headers to work correctly or what?

Thanks.

Update:

#include <cstdio>

#include <cstdlib>

#include <iostream>

using namespace std;

1 Answer

Relevance
  • 1 decade ago
    Favorite Answer

    Just a quick thought (which actually occurred to me yesterday AFTER I was trying to answer someone else's question.

    What does your typical header look like?

    Does it look like:

    #include <iostream>

    or

    #include "iostream"

    ?

    The former tells the compiler that iostream, or iostream.h depending on your compiler, may be found in the INCLUDE directory which is Visual Studio Pro's default. The latter says that iostream is right here in the directory where I keep the source file (unlikely). If you do something like #include iostream or #include [iostream] that's not defined at all so you are not telling the compiler anything.

    For more specific information and help we need to know exactly how you include the header. Could you cut and paste the #include line of one of the offending programs?

Still have questions? Get your answers by asking now.