Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Reading from .txt and putting data (double) in array[]
Re: Reading from .txt and putting data (double) in array[] [message #47657 is a reply to message #47654] Wed, 22 February 2017 12:45 Go to previous messageGo to previous message
omari is currently offline  omari
Messages: 266
Registered: March 2010
Experienced Member
hi,

here a possibe solution
FileIn fi("c:\\tmp\\f.txt");
int array[12];

for(int i = 0; i< 6 && !fi.IsEof(); i++)
{
  String line = fi.GetLine();
}

for(int i = 0; i< 12 && !fi.IsEof(); i++)
{
  String line = fi.GetLine();
  double d = StrDbl(line);
  array[i] = (int)d;
}



regards
omari.
 
Read Message
Read Message
Read Message
Previous Topic: Connect with an external static library
Next Topic: [SOLVED] How to load an array added to an TabCtrl?
Goto Forum:
  


Current Time: Tue Jun 04 22:17:59 CEST 2024

Total time taken to generate the page: 0.02225 seconds