Click here to Skip to main content
Rate this: bad
good
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 2:51am
Rate this: bad
good
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).
  Permalink  
Comments
Schehaider_Aymen at 17-Jan-12 9:12am
   
Thank you Jochen for your try
JackDingler at 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
good
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. Smile | :)
  Permalink  

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

  Print Answers RSS
0 Maciej Los 245
1 OriginalGriff 210
2 Manfred R. Bihy 190
3 CHill60 180
4 _Amy 155
0 OriginalGriff 7,445
1 Sergey Alexandrovich Kryukov 6,157
2 Maciej Los 3,774
3 Peter Leow 3,448
4 CHill60 2,702


Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 18 Jan 2012
Copyright © CodeProject, 1999-2014
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