private: void btnAddTime_Click(System::Object ^ sender, System::EventArgs ^ e)
{
if(openHeartRateFile->ShowDialog() == System::Windows::Forms::DialogResult::OK)
{
System::IO::StreamReader ^ sr = gcnew System::IO::StreamReader(openHeartRateFile->FileName);
sTemp = sr->ReadToEnd();
MessageBox::Show(sTemp);
sr->Close();
}
}
1 Replies - 4590 Views - Last Post: 09 November 2012 - 06:20 PM
#1
C++/CLI StreamReader ReadToEnd() only getting first digit of double
Posted 19 July 2012 - 05:58 PM
I have an input file containing the double 51.5601707265774, and when i open it in the dialogue box as defined bellow, only the digit five shows up in the message box. What could be the cause of this? How can I fix it?
Replies To: C++/CLI StreamReader ReadToEnd() only getting first digit of double
#2
Re: C++/CLI StreamReader ReadToEnd() only getting first digit of double
Posted 09 November 2012 - 06:20 PM
Hi
Is the file you are trying to open a text or binary file?
I would suggest from your result that it could be a binary file!
If it's a binary file then you should be using System::IO::BinaryReader
Milton...
Is the file you are trying to open a text or binary file?
I would suggest from your result that it could be a binary file!
If it's a binary file then you should be using System::IO::BinaryReader
Milton...
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote



|