Click here to Skip to main content
16,011,436 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: how do i pass UDT to from Compnt to ClientApp? Pin
Jörgen Sigvardsson30-Sep-05 9:13
Jörgen Sigvardsson30-Sep-05 9:13 
GeneralRe: how do i pass UDT to from Compnt to ClientApp? Pin
Eytukan3-Oct-05 6:30
Eytukan3-Oct-05 6:30 
QuestionHow to get the specified item in IHTMLDocument2?I have no any idea.Need help! Pin
at2000128-Sep-05 17:18
at2000128-Sep-05 17:18 
AnswerRe: How to get the specified item in IHTMLDocument2?I have no any idea.Need help! Pin
at2000128-Sep-05 21:53
at2000128-Sep-05 21:53 
Questiongarbage collection & compaction Pin
Member 231338128-Sep-05 3:54
Member 231338128-Sep-05 3:54 
Questionprograming the video RAM Pin
Member 231338128-Sep-05 3:47
Member 231338128-Sep-05 3:47 
QuestionOCX link to ATL Pin
honae28-Sep-05 2:56
honae28-Sep-05 2:56 
Question(cout << double) != (cin >> double) Pin
Malcolm Smart28-Sep-05 0:40
Malcolm Smart28-Sep-05 0:40 
Hi - a double has max size of e308 and min of e-308 (or 307, irrelevant in this case). I can stream out doubles up (down?) to a size of e-324, but only read them back in at e-308. Any ideas? Test code below - sorry for length....

Cheers

Angel

double dTestarray[30];
//set the base
dTestarray[0] = 1.23456789e-301;

//decrement by a factor of ten
for (int i = 1 ; i < 30 ; ++i)
	dTestarray[i] = dTestarray[i-1] / 10;

std::ofstream fout("c:\\double.txt" , std::ios::out);

for (i = 0 ; i < 30 ; ++i)
	fout << dTestarray[i] << std::endl;

fout.close();

/*
[OUTPUT (file contents) ]
1.23457e-301
1.23457e-302
1.23457e-303
1.23457e-304
1.23457e-305
1.23457e-306
1.23457e-307
1.23457e-308
1.23457e-309
1.23457e-310
1.23457e-311
1.23457e-312
1.23457e-313
1.23457e-314
1.23457e-315
1.23457e-316
1.23457e-317
1.23457e-318
1.23457e-319
1.23467e-320
1.23516e-321
1.23516e-322
9.88131e-324
0
0
0
0
0
0
0
*/

//read them all back in
double dTest(0);

std::ifstream fin("c:\\double.txt" , std::ios::in);

int Line(1);
while (fin)
{
	fin >> dTest;

	if (fin.fail())
		std::cout << "Failed on line " << Line << std::endl;
	else
		std::cout << "Line " << Line++ << " read as " << dTest << std::endl;
}

/*
[OUTPUT (std::cout) ]
Line 1 read as 1.23457e-301
Line 2 read as 1.23457e-302
Line 3 read as 1.23457e-303
Line 4 read as 1.23457e-304
Line 5 read as 1.23457e-305
Line 6 read as 1.23457e-306
Line 7 read as 1.23457e-307
Failed on line 8
Press any key to continue
*/


*********************************************
The sooner you fall behind, the longer you have to catch up.


-- modified at 8:46 Wednesday 28th September, 2005
QuestionMy control can't run on win98,help~~ Pin
at2000127-Sep-05 15:41
at2000127-Sep-05 15:41 
AnswerRe: My control can't run on win98,help~~ Pin
Anonymous28-Sep-05 1:48
Anonymous28-Sep-05 1:48 
GeneralRe: My control can't run on win98,help~~ Pin
at2000128-Sep-05 6:00
at2000128-Sep-05 6:00 
QuestionNo _disinterface :( Pin
Eytukan26-Sep-05 6:17
Eytukan26-Sep-05 6:17 
GeneralRe: No _disinterface :( Pin
Jörgen Sigvardsson26-Sep-05 12:17
Jörgen Sigvardsson26-Sep-05 12:17 
GeneralRe: No _disinterface :( Pin
Eytukan27-Sep-05 6:15
Eytukan27-Sep-05 6:15 
GeneralRe: No _disinterface :( Pin
Jörgen Sigvardsson27-Sep-05 9:44
Jörgen Sigvardsson27-Sep-05 9:44 
GeneralRe: No _disinterface :( Pin
Eytukan27-Sep-05 23:10
Eytukan27-Sep-05 23:10 
AnswerRe: No _disinterface :( Pin
Eytukan28-Sep-05 3:24
Eytukan28-Sep-05 3:24 
GeneralRe: No _disinterface :( Pin
Jörgen Sigvardsson28-Sep-05 9:50
Jörgen Sigvardsson28-Sep-05 9:50 
GeneralRe: No _disinterface :( Pin
Eytukan28-Sep-05 22:57
Eytukan28-Sep-05 22:57 
GeneralRe: No _disinterface :( Pin
Jörgen Sigvardsson29-Sep-05 4:12
Jörgen Sigvardsson29-Sep-05 4:12 
QuestionDisplay avi files Pin
S/Madjid25-Sep-05 23:58
S/Madjid25-Sep-05 23:58 
QuestionHelp needed with ATL OLEDB Consmer Pin
Omar Alvi25-Sep-05 23:36
Omar Alvi25-Sep-05 23:36 
QuestionPutting a slider on dialog box causes error Pin
Tomek.Sergey24-Sep-05 4:19
Tomek.Sergey24-Sep-05 4:19 
QuestionBSTR Pin
Eytukan23-Sep-05 3:32
Eytukan23-Sep-05 3:32 
AnswerRe: BSTR Pin
Anonymous23-Sep-05 5:27
Anonymous23-Sep-05 5: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.