Click here to Skip to main content
15,889,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionc++ code Pin
phineas kimathi19-Jul-12 2:46
phineas kimathi19-Jul-12 2:46 
AnswerRe: c++ code Pin
Richard MacCutchan19-Jul-12 3:21
mveRichard MacCutchan19-Jul-12 3:21 
AnswerRe: c++ code Pin
Rajesh R Subramanian19-Jul-12 3:34
professionalRajesh R Subramanian19-Jul-12 3:34 
AnswerRe: c++ code Pin
Software_Developer19-Jul-12 6:52
Software_Developer19-Jul-12 6:52 
GeneralRe: c++ code Pin
Richard MacCutchan19-Jul-12 22:20
mveRichard MacCutchan19-Jul-12 22:20 
SuggestionRe: c++ code Pin
David Crow20-Jul-12 2:29
David Crow20-Jul-12 2:29 
GeneralRe: c++ code Pin
Software_Developer20-Jul-12 3:30
Software_Developer20-Jul-12 3:30 
QuestionError happen when open file while migrate VC++ 6 to VS2008 Pin
Andraw11118-Jul-12 9:16
Andraw11118-Jul-12 9:16 
Hi,dear all,

I have a project created using C++ 6.0. Now I need to update it to VS2008, now I have a problem when I try to open a file.

In C++ 6.0
#include <fstream.h>
ifstream INPFile(INPFileName, ios::nocreate);

In VS2008

#include <fstream>
ifstream INPFile(INPFileName, ios::nocreate);

the second line get the following error:
Error 23 error C2039: 'nocreate' : is not a member of 'std::basic_ios<_Elem,_Traits>'

Error 24 error C2065: 'nocreate' : undeclared identifier

If I change the second line to the following:

ifstream INPFile(INPFileName)

then get new error as following
error 2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class 'std::basic_ios<_Elem,_Traits>'

How can I solve this issue?

Thanks!
AnswerRe: Error happen when open file while migrate VC++ 6 to VS2008 Pin
Albert Holguin18-Jul-12 9:47
professionalAlbert Holguin18-Jul-12 9:47 
GeneralRe: Error happen when open file while migrate VC++ 6 to VS2008 Pin
Andraw11118-Jul-12 10:01
Andraw11118-Jul-12 10:01 
AnswerRe: Error happen when open file while migrate VC++ 6 to VS2008 Pin
Albert Holguin18-Jul-12 11:35
professionalAlbert Holguin18-Jul-12 11:35 
GeneralRe: Error happen when open file while migrate VC++ 6 to VS2008 Pin
Richard MacCutchan18-Jul-12 21:59
mveRichard MacCutchan18-Jul-12 21:59 
GeneralRe: Error happen when open file while migrate VC++ 6 to VS2008 Pin
Andraw11119-Jul-12 3:29
Andraw11119-Jul-12 3:29 
GeneralRe: Error happen when open file while migrate VC++ 6 to VS2008 Pin
Andraw11119-Jul-12 5:40
Andraw11119-Jul-12 5:40 
GeneralRe: Error happen when open file while migrate VC++ 6 to VS2008 Pin
Andraw11119-Jul-12 6:17
Andraw11119-Jul-12 6:17 
GeneralRe: Error happen when open file while migrate VC++ 6 to VS2008 Pin
Andraw11119-Jul-12 6:25
Andraw11119-Jul-12 6:25 
AnswerRe: Error happen when open file while migrate VC++ 6 to VS2008 Pin
jschell20-Jul-12 7:15
jschell20-Jul-12 7:15 
Generalsearch for a word in a text file Pin
byank18-Jul-12 2:14
byank18-Jul-12 2:14 
QuestionRe: search for a word in a text file Pin
David Crow18-Jul-12 2:18
David Crow18-Jul-12 2:18 
AnswerRe: search for a word in a text file Pin
byank19-Jul-12 11:00
byank19-Jul-12 11:00 
GeneralRe: search for a word in a text file Pin
David Crow20-Jul-12 2:24
David Crow20-Jul-12 2:24 
GeneralRe: search for a word in a text file Pin
Shaunak De20-Jul-12 3:17
Shaunak De20-Jul-12 3:17 
GeneralRe: search for a word in a text file Pin
David Crow20-Jul-12 4:51
David Crow20-Jul-12 4:51 
GeneralRe: search for a word in a text file Pin
byank20-Jul-12 7:28
byank20-Jul-12 7:28 
GeneralRe: search for a word in a text file Pin
Software_Developer18-Jul-12 3:40
Software_Developer18-Jul-12 3:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.