Click here to Skip to main content
15,915,057 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Change caption of an application Pin
john56322-Feb-10 18:24
john56322-Feb-10 18:24 
GeneralRe: Change caption of an application Pin
«_Superman_»2-Feb-10 18:36
professional«_Superman_»2-Feb-10 18:36 
QuestionRe: Change caption of an application Pin
Avi Berger2-Feb-10 18:26
Avi Berger2-Feb-10 18:26 
AnswerRe: Change caption of an application Pin
john56322-Feb-10 19:05
john56322-Feb-10 19:05 
Question64 bit ActiveX Chart control Pin
Don M2-Feb-10 12:12
Don M2-Feb-10 12:12 
QuestionConvert CFile IO to istream IO Pin
transoft2-Feb-10 3:48
transoft2-Feb-10 3:48 
AnswerRe: Convert CFile IO to istream IO Pin
«_Superman_»2-Feb-10 4:00
professional«_Superman_»2-Feb-10 4:00 
GeneralRe: Convert CFile IO to istream IO Pin
transoft2-Feb-10 4:26
transoft2-Feb-10 4:26 
GeneralRe: Convert CFile IO to istream IO Pin
KingsGambit2-Feb-10 5:08
KingsGambit2-Feb-10 5:08 
QuestionMultiple open database links using CDatabase Pin
bob169722-Feb-10 3:46
bob169722-Feb-10 3:46 
AnswerRe: Multiple open database links using CDatabase Pin
bob169723-Feb-10 8:55
bob169723-Feb-10 8:55 
Questionneed some suggestion on a method to use Pin
benjamin yap2-Feb-10 3:42
benjamin yap2-Feb-10 3:42 
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
Maximilien2-Feb-10 4:17 
AnswerRe: need some suggestion on a method to use Pin
David Crow2-Feb-10 5:18
David Crow2-Feb-10 5:18 
GeneralRe: need some suggestion on a method to use Pin
benjamin yap2-Feb-10 22:39
benjamin yap2-Feb-10 22:39 
GeneralRe: need some suggestion on a method to use Pin
David Crow3-Feb-10 3:14
David Crow3-Feb-10 3:14 
GeneralRe: need some suggestion on a method to use Pin
benjamin yap3-Feb-10 4:28
benjamin yap3-Feb-10 4:28 
AnswerRe: need some suggestion on a method to use Pin
David Crow3-Feb-10 4:35
David Crow3-Feb-10 4:35 
Questionios::in | ios::out error Pin
Sujan Dhakal2-Feb-10 1:09
Sujan 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
David Crow2-Feb-10 3:20 
AnswerRe: ios::in | ios::out error Pin
Sujan Dhakal2-Feb-10 9:46
Sujan Dhakal2-Feb-10 9:46 
AnswerRe: ios::in | ios::out error Pin
David Crow2-Feb-10 9:51
David Crow2-Feb-10 9:51 
GeneralRe: ios::in | ios::out error Pin
Sujan Dhakal2-Feb-10 16:27
Sujan Dhakal2-Feb-10 16:27 

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.