Click here to Skip to main content
15,905,563 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionRe: [C++/CLI]:impor huge file into memory Pin
Mark Salsbery17-Jul-07 7:50
Mark Salsbery17-Jul-07 7:50 
AnswerRe: [C++/CLI]:impor huge file into memory Pin
ffgtrg1616g261217-Jul-07 11:08
ffgtrg1616g261217-Jul-07 11:08 
AnswerRe: [C++/CLI]:impor huge file into memory Pin
ffgtrg1616g261217-Jul-07 22:19
ffgtrg1616g261217-Jul-07 22:19 
GeneralRe: [C++/CLI]:impor huge file into memory Pin
Mark Salsbery18-Jul-07 5:43
Mark Salsbery18-Jul-07 5:43 
General3 Gb Memory Barrier Pin
George L. Jackson17-Jul-07 14:26
George L. Jackson17-Jul-07 14:26 
QuestionImplementation of CRC12,CRC16 Pin
Kiran Pinjala17-Jul-07 2:30
Kiran Pinjala17-Jul-07 2:30 
AnswerRe: Implementation of CRC12,CRC16 Pin
led mike17-Jul-07 4:56
led mike17-Jul-07 4:56 
Question(solved) strange thing_one digit missing when using %d for standard output [modified] Pin
bloodwinner17-Jul-07 2:15
bloodwinner17-Jul-07 2:15 
I am recording to current time, and compare with the old time which stored in a file. but here t4 is always one digit less.

for example, when I check file end.txt and start.txt, t4 is 22284, and t3 is 21975, no problem.
but when I calculate and output differ, it shows 2228-21975=-19747. t4 is wrong! what is the problem here?

<br />
	int differ=0;<br />
//	int old_time=0;<br />
	int t3=0;<br />
	int t4=0;<br />
	time_t t1,t2;<br />
	FILE * pFile;                <br />
<br />
         	(void) time(&t2);             // record the current time<br />
		t4=(int)t2;<br />
		pFile = fopen ("/root/pclinq/end.txt","r+");<br />
		fprintf (pFile, "%d",t4);         //save the current time to the file<br />
		fclose (pFile);<br />
		<br />
		<br />
		pFile = fopen ("/root/pclinq/start.txt","r+");<br />
		fscanf (pFile, "%d", &t3);             //dig out the old time saved<br />
		fclose (pFile);<br />
		<br />
		differ=t4-t3;<br />
	<br />
	<br />
		printf("differ is %d-%d=%d\n",t4,t3,differ);



(solved)it turns out the last digit was a remaining one, for example,2228 is the real number recorded this time


-- modified at 8:51 Tuesday 17th July, 2007
AnswerRe: (solved) strange thing_one digit missing when using %d for standard output Pin
Luc Pattyn17-Jul-07 3:09
sitebuilderLuc Pattyn17-Jul-07 3:09 
QuestionTo know the character strike Pin
mikobi16-Jul-07 22:28
mikobi16-Jul-07 22:28 
AnswerRe: To know the character strike Pin
Luc Pattyn16-Jul-07 23:23
sitebuilderLuc Pattyn16-Jul-07 23:23 
QuestionTo know the character strike Pin
mikobi16-Jul-07 22:24
mikobi16-Jul-07 22:24 
AnswerRe: To know the character strike Pin
Paul Conrad21-Jul-07 18:52
professionalPaul Conrad21-Jul-07 18:52 
Questionout parameters Pin
a.mulay16-Jul-07 20:37
a.mulay16-Jul-07 20:37 
AnswerRe: out parameters Pin
G Haranadh16-Jul-07 21:03
G Haranadh16-Jul-07 21:03 
AnswerRe: out parameters Pin
George L. Jackson17-Jul-07 12:01
George L. Jackson17-Jul-07 12:01 
GeneralRe: out parameters Pin
a.mulay17-Jul-07 17:33
a.mulay17-Jul-07 17:33 
GeneralRe: out parameters Pin
G Haranadh26-Jul-07 6:46
G Haranadh26-Jul-07 6:46 
QuestionStatic member variable in class? Pin
G Haranadh16-Jul-07 19:59
G Haranadh16-Jul-07 19:59 
AnswerRe: Static member variable in class? Pin
Shoaib Hussain17-Jul-07 3:19
Shoaib Hussain17-Jul-07 3:19 
Questionproblem in thread ???????????? Pin
abbd16-Jul-07 9:28
abbd16-Jul-07 9:28 
AnswerRe: problem in thread ???????????? Pin
led mike16-Jul-07 10:50
led mike16-Jul-07 10:50 
GeneralRe: problem in thread ???????????? Pin
Mark Salsbery16-Jul-07 12:39
Mark Salsbery16-Jul-07 12:39 
QuestionL”” or to “” Strings Pin
earlgraham16-Jul-07 9:22
earlgraham16-Jul-07 9:22 
AnswerRe: L"" or "" Strings [modified] Pin
Mark Salsbery16-Jul-07 9:43
Mark Salsbery16-Jul-07 9:43 

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.