Click here to Skip to main content
15,923,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Decimal number class Pin
toxcct14-Oct-04 19:50
toxcct14-Oct-04 19:50 
GeneralRe: Decimal number class Pin
paulb14-Oct-04 20:35
paulb14-Oct-04 20:35 
GeneralRe: Decimal number class Pin
Cedric Moonen14-Oct-04 20:49
Cedric Moonen14-Oct-04 20:49 
GeneralRe: Decimal number class Pin
toxcct14-Oct-04 22:37
toxcct14-Oct-04 22:37 
GeneralRe: Decimal number class Pin
jan larsen15-Oct-04 2:34
jan larsen15-Oct-04 2:34 
GeneralRe: Decimal number class Pin
markkuk15-Oct-04 0:06
markkuk15-Oct-04 0:06 
GeneralRe: Decimal number class Pin
David Crow15-Oct-04 6:25
David Crow15-Oct-04 6:25 
GeneralSimple file I/O is giving me trouble Pin
georgiek5014-Oct-04 18:59
georgiek5014-Oct-04 18:59 
I am trying to read the entire content of a text file with the following code:

File.seekg(0, ios::end);<br />
<br />
		long lFileSize = File.tellg();<br />
		<br />
		szFileBuffer = new char[lFileSize + 1];<br />
<br />
		if ( szFileBuffer == NULL )<br />
		{<br />
			MessageBox(NULL, "There is not enough memory to run this application",<br />
				       NULL, MB_ICONERROR | MB_OK);<br />
<br />
			return 1;<br />
		}<br />
<br />
		File.seekg(0, ios::beg);<br />
<br />
		File.get(szFileBuffer, lFileSize + 1, EOF);<br />
<br />
		File.close();


The actual filesize is 715KB but the program is only reading 540KB...tellg gives the correct filesize yet get seems to only be getting 540KB...are there any workarounds for this...in general, are there buffer size limitations as far as istream::get is concerned?
GeneralRe: Simple file I/O is giving me trouble Pin
Sujan Christo14-Oct-04 21:24
Sujan Christo14-Oct-04 21:24 
GeneralRe: Simple file I/O is giving me trouble Pin
Mad__14-Oct-04 22:22
Mad__14-Oct-04 22:22 
GeneralRe: Simple file I/O is giving me trouble Pin
David Crow15-Oct-04 7:56
David Crow15-Oct-04 7:56 
GeneralRe: Simple file I/O is giving me trouble Pin
georgiek5015-Oct-04 17:11
georgiek5015-Oct-04 17:11 
GeneralMenu shortcut keys Pin
Imtiaz Murtaza14-Oct-04 18:36
Imtiaz Murtaza14-Oct-04 18:36 
GeneralRe: Menu shortcut keys Pin
geo_m14-Oct-04 19:51
geo_m14-Oct-04 19:51 
GeneralRe: Menu shortcut keys Pin
Imtiaz Murtaza14-Oct-04 19:55
Imtiaz Murtaza14-Oct-04 19:55 
GeneralRe: Menu shortcut keys Pin
geo_m14-Oct-04 23:28
geo_m14-Oct-04 23:28 
Generalanalog clock Pin
Mr Bose Dayala14-Oct-04 18:01
Mr Bose Dayala14-Oct-04 18:01 
GeneralRe: analog clock Pin
ThatsAlok14-Oct-04 18:39
ThatsAlok14-Oct-04 18:39 
GeneralRe: analog clock Pin
Mr Bose Dayala14-Oct-04 19:27
Mr Bose Dayala14-Oct-04 19:27 
GeneralRe: analog clock Pin
ThatsAlok14-Oct-04 21:14
ThatsAlok14-Oct-04 21:14 
GeneralRe: analog clock Pin
Ryan Binns14-Oct-04 18:40
Ryan Binns14-Oct-04 18:40 
GeneralRe: analog clock Pin
V.14-Oct-04 22:46
professionalV.14-Oct-04 22:46 
QuestionHow to pass data to and from two forms? Pin
V5Dave14-Oct-04 15:59
V5Dave14-Oct-04 15:59 
AnswerRe: How to pass data to and from two forms? Pin
Sujan Christo14-Oct-04 19:22
Sujan Christo14-Oct-04 19:22 
AnswerRe: How to pass data to and from two forms? Pin
Michael P Butler15-Oct-04 0:33
Michael P Butler15-Oct-04 0:33 

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.