Click here to Skip to main content
15,888,195 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: htmlhelp visual studio .net Pin
Anonymous24-Dec-04 19:30
Anonymous24-Dec-04 19:30 
QuestionHow to access Window Procedure of another processes window Pin
User 21559723-Dec-04 23:48
User 21559723-Dec-04 23:48 
QuestionWhy I can't run my app. on Win XP? Pin
ArielR23-Dec-04 23:36
ArielR23-Dec-04 23:36 
AnswerRe: Why I can't run my app. on Win XP? Pin
Aamir Butt23-Dec-04 23:39
Aamir Butt23-Dec-04 23:39 
GeneralRe: Why I can't run my app. on Win XP? Pin
ArielR23-Dec-04 23:45
ArielR23-Dec-04 23:45 
GeneralRe: Why I can't run my app. on Win XP? Pin
Steve S24-Dec-04 0:58
Steve S24-Dec-04 0:58 
GeneralRe: Why I can't run my app. on Win XP? Pin
ArielR28-Dec-04 2:25
ArielR28-Dec-04 2:25 
Generalfstream problem Pin
Imtiaz Murtaza23-Dec-04 23:01
Imtiaz Murtaza23-Dec-04 23:01 
Friends,
I am opening a file using std::fstream. The purpose is to read all the contents of file into a buffer and then close the file. Program uses this buffer later.

The problem is that i am not an expert of fstream. I am using a function Read(), to copy data from file to buffer. The problem is the allocation of buffer. Lets see what i am doing:

fstream file("somefile.txt");

char *pBuffer = CreateNewBuffer(100) // 100 is buffer size

while(!file.eof())
{
file.read(buffer,100);
// Blah Blah
}
I don't know the number of bytes actually present in the file and so i am creating the buffer of size 100.

Is there any way to find out that how many bytes are there in the file OR how many bytes left, so that there will only be one Read() call instead of loop??
And most important for me is that how may bytes are actually read into the buffer.

Imtiaz
GeneralRe: fstream problem Pin
Andrew Walker24-Dec-04 1:06
Andrew Walker24-Dec-04 1:06 
QuestionHow to display a Message when click on a Edit Box Scroll bar ? Pin
pubududilena23-Dec-04 22:17
pubududilena23-Dec-04 22:17 
AnswerRe: How to display a Message when click on a Edit Box Scroll bar ? Pin
Aamir Butt23-Dec-04 22:31
Aamir Butt23-Dec-04 22:31 
GeneralRe: How to display a Message when click on a Edit Box Scroll bar ? Pin
pubududilena23-Dec-04 22:40
pubududilena23-Dec-04 22:40 
Questioncan i make command buttons in vc++(like vb) Pin
siva_nkl3323-Dec-04 21:47
siva_nkl3323-Dec-04 21:47 
AnswerRe: can i make command buttons in vc++(like vb) Pin
ThatsAlok23-Dec-04 22:47
ThatsAlok23-Dec-04 22:47 
Generalabout breakpoints in VC++ Pin
grace_sonal23-Dec-04 21:05
grace_sonal23-Dec-04 21:05 
GeneralRe: about breakpoints in VC++ Pin
mirex25-Dec-04 7:35
mirex25-Dec-04 7:35 
GeneralTemplate class and header files Pin
Imtiaz Murtaza23-Dec-04 19:01
Imtiaz Murtaza23-Dec-04 19:01 
GeneralRe: Template class and header files Pin
Michael Dunn23-Dec-04 21:08
sitebuilderMichael Dunn23-Dec-04 21:08 
Questionhow to call exe file in vc++ Pin
vc-programmer-23-Dec-04 17:31
vc-programmer-23-Dec-04 17:31 
AnswerRe: how to call exe file in vc++ Pin
parths23-Dec-04 18:03
parths23-Dec-04 18:03 
GeneralRe: how to call exe file in vc++ Pin
pavanbhai23-Dec-04 18:43
pavanbhai23-Dec-04 18:43 
AnswerRe: how to call exe file in vc++ Pin
Sarfraz Anwar23-Dec-04 18:18
Sarfraz Anwar23-Dec-04 18:18 
AnswerRe: how to call exe file in vc++ Pin
ThatsAlok23-Dec-04 18:21
ThatsAlok23-Dec-04 18:21 
GeneralRe: how to call exe file in vc++ Pin
Member 45151623-Dec-04 18:43
Member 45151623-Dec-04 18:43 
GeneralRe: thank...can i pass parameter Pin
vc-programmer-23-Dec-04 19:56
vc-programmer-23-Dec-04 19:56 

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.