Click here to Skip to main content
12,761,018 members (32,663 online)
Rate this:
Please Sign up or sign in to vote.
See more: VC7 C++
Hi All,

I have an MFC application under VC++ 2005. I intended to use vector variables
including this line to my project

#include <vector>
#include <iostream>

using namespace std;

when i compile my programm i got this issue
error C2065: 'EOF' : undeclared identifier

it's mainly related to the
#include <vector>

is there any explanation to that problem?

Thank You
Posted 17-Jan-12 3:51am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

EOF is defined in stdio.h. So including this may solve your problem. But EOF is not used by vectors and I think the error happens somewhere else (source file name and line number are shown by the error output).
Schehaider_Aymen 17-Jan-12 9:12am
Thank you Jochen for your try
JackDingler 17-Jan-12 11:17am
Schehaider, do you know why your change fixed the error?

Hint: It has to do with Jochen's answer...

Rate this: bad
Please Sign up or sign in to vote.

Solution 3

try creating a sample application just including vector only. you will realize that the problem is with some others. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170217.1 | Last Updated 18 Jan 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100