Click here to Skip to main content
15,925,309 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Simple array-problem Pin
Roger Stoltz3-Sep-08 6:31
Roger Stoltz3-Sep-08 6:31 
GeneralRe: Simple array-problem Pin
Joplinazz3-Sep-08 8:03
Joplinazz3-Sep-08 8:03 
QuestionCreating a UI thread with CWinThread Pin
sashoalm3-Sep-08 4:57
sashoalm3-Sep-08 4:57 
AnswerRe: Creating a UI thread with CWinThread Pin
Mark Salsbery3-Sep-08 5:06
Mark Salsbery3-Sep-08 5:06 
GeneralRe: Creating a UI thread with CWinThread Pin
sashoalm3-Sep-08 5:10
sashoalm3-Sep-08 5:10 
GeneralRe: Creating a UI thread with CWinThread Pin
Mark Salsbery3-Sep-08 5:20
Mark Salsbery3-Sep-08 5:20 
GeneralRe: Creating a UI thread with CWinThread Pin
sashoalm3-Sep-08 5:26
sashoalm3-Sep-08 5:26 
Questionifstream Pin
FrankMookie3-Sep-08 4:36
FrankMookie3-Sep-08 4:36 
Hi.I'm using visual c++ 9.0.
I want to do something like this:
string name = get_name();
string filename = name+("text.dat");

ifstream infile_file;

infile_file.open(filename);
(code)
(...)


I'm doing something wrong... or I am missing something.
Here is the error:
error C2664: 'void std::basic_ifstream<_Elem,_Traits>::open(const wchar_t *,std::ios_base::openmode,int)' : cannot convert parameter 1 from 'std::string' to 'const wchar_t *'
with
[
_Elem=char,
_Traits=std::char_traits<char>
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

Thanks.

"Failure is always an option."

AnswerRe: ifstream [modified] Pin
toxcct3-Sep-08 4:52
toxcct3-Sep-08 4:52 
GeneralRe: ifstream Pin
FrankMookie3-Sep-08 5:05
FrankMookie3-Sep-08 5:05 
GeneralRe: ifstream Pin
toxcct3-Sep-08 5:06
toxcct3-Sep-08 5:06 
AnswerRe: ifstream Pin
David Crow3-Sep-08 4:57
David Crow3-Sep-08 4:57 
GeneralRe: ifstream Pin
FrankMookie3-Sep-08 5:03
FrankMookie3-Sep-08 5:03 
QuestionProblem with MFC ActiveX and Excel Pin
AnTri3-Sep-08 3:34
AnTri3-Sep-08 3:34 
QuestionAccess to xlsx-format? Pin
Andy@3-Sep-08 3:34
Andy@3-Sep-08 3:34 
QuestionRe: Access to xlsx-format? Pin
led mike3-Sep-08 4:27
led mike3-Sep-08 4:27 
AnswerRe: Access to xlsx-format? Pin
Andy@3-Sep-08 20:16
Andy@3-Sep-08 20:16 
GeneralRe: Access to xlsx-format? Pin
led mike4-Sep-08 8:00
led mike4-Sep-08 8:00 
GeneralRe: Access to xlsx-format? Pin
Andy@4-Sep-08 20:27
Andy@4-Sep-08 20:27 
QuestionSelecting an area with mouse From the screen Pin
Nyil3-Sep-08 2:24
Nyil3-Sep-08 2:24 
AnswerRe: Selecting an area with mouse From the screen Pin
Sarath C3-Sep-08 5:09
Sarath C3-Sep-08 5:09 
AnswerRe: Selecting an area with mouse From the screen Pin
Mark Salsbery3-Sep-08 5:17
Mark Salsbery3-Sep-08 5:17 
QuestionCopy File Pin
cpvc++3-Sep-08 2:00
cpvc++3-Sep-08 2:00 
AnswerRe: Copy File Pin
toxcct3-Sep-08 2:16
toxcct3-Sep-08 2:16 
AnswerRe: Copy File Pin
sashoalm3-Sep-08 2:17
sashoalm3-Sep-08 2:17 

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.