user2670260
user2670260

Reputation:

fatal error C1083: Cannot open include file: 'Item.h”': No such file or directory

I have a .cpp file called factory.cpp, that looks as follows: (just starting the program)

#include "stdafx.h"
#include "Item.h”
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <ctime>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
    return 0;
}

My item.h looks like this:

#ifndef ITEM_H
#define ITEM_H

#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <ctime>

Class Item{
public:
...

private:
...
};

#endif

When I try to compile I get the following error: fatal error C1083: Cannot open include file: 'Item.h”': No such file or directory.

I have checked, and both my cpp file and my header are located at the following directory:

c:\Users\User\documents\visual studio 2010\Projects\factory\factory\

and just to be on the safe side I even added this directory to additional included directories, yet stil no success... I am using Microsoft Visual Studio 2010 express, and would greatly appreciate your help. Thanks!

Upvotes: 0

Views: 5102

Answers (1)

Plo_Koon
Plo_Koon

Reputation: 3033

Your include is wrong, you must use ", but not ”. You have:

#include "Item.h”

You should have:

#include "Item.h"

Upvotes: 4

Related Questions