Click here to Skip to main content
14,664,547 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: need some suggestion on a method to use Pin
«_Superman_»2-Feb-10 4:08
professional«_Superman_»2-Feb-10 4:08 
AnswerRe: need some suggestion on a method to use Pin
Maximilien2-Feb-10 4:17
MemberMaximilien2-Feb-10 4:17 
AnswerRe: need some suggestion on a method to use Pin
David Crow2-Feb-10 5:18
MemberDavid Crow2-Feb-10 5:18 
GeneralRe: need some suggestion on a method to use Pin
benjamin yap2-Feb-10 22:39
Memberbenjamin yap2-Feb-10 22:39 
GeneralRe: need some suggestion on a method to use Pin
David Crow3-Feb-10 3:14
MemberDavid Crow3-Feb-10 3:14 
GeneralRe: need some suggestion on a method to use Pin
benjamin yap3-Feb-10 4:28
Memberbenjamin yap3-Feb-10 4:28 
AnswerRe: need some suggestion on a method to use Pin
David Crow3-Feb-10 4:35
MemberDavid Crow3-Feb-10 4:35 
Questionios::in | ios::out error Pin
Sujan Dhakal2-Feb-10 1:09
MemberSujan Dhakal2-Feb-10 1:09 
#include <iostream>
#include <fstream>
using namespace std;

int main() {
fstream file("c:\\test.txt",ios::in | ios::out | ios::binary);
if(file.is_open())
{
file<<"Hello";
file.close();
}
else
{
cout<<"Error";
}

return 0;
}

I wonder why this code is giving me the output "Error" unexpectedly...what went wrong in this code. I'm not able to write texts in file..please help
AnswerRe: ios::in | ios::out error Pin
CPallini2-Feb-10 1:32
mveCPallini2-Feb-10 1:32 
QuestionRe: ios::in | ios::out error Pin
David Crow2-Feb-10 3:20
MemberDavid Crow2-Feb-10 3:20 
AnswerRe: ios::in | ios::out error Pin
Sujan Dhakal2-Feb-10 9:46
MemberSujan Dhakal2-Feb-10 9:46 
AnswerRe: ios::in | ios::out error Pin
David Crow2-Feb-10 9:51
MemberDavid Crow2-Feb-10 9:51 
GeneralRe: ios::in | ios::out error Pin
Sujan Dhakal2-Feb-10 16:27
MemberSujan Dhakal2-Feb-10 16:27 
GeneralRe: ios::in | ios::out error Pin
CPallini2-Feb-10 21:16
mveCPallini2-Feb-10 21:16 
GeneralRe: ios::in | ios::out error Pin
Sujan Dhakal3-Feb-10 0:55
MemberSujan Dhakal3-Feb-10 0:55 
GeneralRe: ios::in | ios::out error Pin
CPallini3-Feb-10 1:30
mveCPallini3-Feb-10 1:30 
AnswerRe: ios::in | ios::out error Pin
xiaozhu87662-Feb-10 17:07
Memberxiaozhu87662-Feb-10 17:07 
QuestionCDialog ON_WM_KEYDOWN event Pin
chevu2-Feb-10 0:20
Memberchevu2-Feb-10 0:20 
QuestionRe: CDialog ON_WM_KEYDOWN event Pin
Nelek2-Feb-10 5:54
protectorNelek2-Feb-10 5:54 
GeneralRe: CDialog ON_WM_KEYDOWN event [modified] Pin
chevu2-Feb-10 15:02
Memberchevu2-Feb-10 15:02 
GeneralRe: CDialog ON_WM_KEYDOWN event Pin
chevu2-Feb-10 21:17
Memberchevu2-Feb-10 21:17 
AnswerRe: CDialog ON_WM_KEYDOWN event Pin
chevu2-Feb-10 23:31
Memberchevu2-Feb-10 23:31 
GeneralRe: CDialog ON_WM_KEYDOWN event Pin
Nelek3-Feb-10 20:36
protectorNelek3-Feb-10 20:36 
Questionhow to download google apis Pin
anshach1-Feb-10 22:45
Memberanshach1-Feb-10 22:45 
AnswerRepost - please ignore. Pin
CPallini1-Feb-10 23:11
mveCPallini1-Feb-10 23:11 

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.