![]() | |
| | #1 |
| desperate elephant... | reading a double from a text file Joghovurd, mi hat ankap harc unem, ete karag ogneq, plz ![]() Uremn unem text file "input.dat" meje "20 60 50.0" (verjum el new line ka) Hima uzum em C-um kardam et tvere... ________________________________________________ ... int membrane_x_size = 0, membrane_y_size = 0; double membrane_height = 0.0; ... FILE *inpPtr; if((inpPtr = fopen("input.dat", "r")) == NULL) printf("File could not be opened\n"); else{ while(!feof(inpPtr)) fscanf(inpPtr, "%d %d %f\n", &membrane_x_size, &membrane_y_size, &membrane_height); }; printf("x size = %d cells \ny size = %d cells \nmembrane_height = %f\n", membrane_x_size, membrane_y_size, membrane_height); ... __________________________________________________ __ Hima probleme ena vor en amenavereve membrane_height-e sahmanem vorpes float, normal karduma, baytc vor double-em sahmanum, gjvuma u tpeluc tpuma menak 0.00000. Inchqan nayum em chem karum gtnem. Inch float sahmanem, heto cast anem double? Mekel inchqan jokum em float-e aveli "vata" qan double-e che (inchvor 64 bit vs 32 bit, ban-man...)
__________________ "The only verdict is vengeance; a vendetta, held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous" - V http://thereisanidea.blogspot.com/ |
| | |
| | #3 |
| Дикообраз-безобраз Join Date: Jul 2004 Location: Armenia, Yerevan
Posts: 2,937
Rep Power: 5 Reputation:
142 | principi ete et tivt 3.4E–38 -- 3.4E+38 sahmanneruma karas float ogtagorces, double@ krknaki avel texa gravum sovorabar
__________________ - Гитлер?!! - Да?!! - Зурна!!! |
| | |
| | #4 | |
| desperate elephant... | Quote:
![]()
__________________ "The only verdict is vengeance; a vendetta, held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous" - V http://thereisanidea.blogspot.com/ | |
| | |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| reading | arabaliozian | Comments | 0 | May 3, 2008 13:25 |
| reading thoughts! | lightontheshore | English Only | 3 | Oct 26, 2005 19:38 |
| reading folder contents in Java | Tria | Languages, Compilers and Interpreters | 2 | Oct 26, 2005 13:27 |
| The Future of Writing | Hrach_Techie | TWARM | 0 | Sep 6, 2005 06:46 |
| DOUBLE LAYER DVD burners and HW | svoy | Hardware | 0 | Aug 30, 2004 22:45 |