|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic |
Last Thread Next Thread ![]() |
| Read Data from Txt file |
|
![]() boehmz Member since: 2/19/2009 From: lees summit, MO, United States |
||||
|
|
||||
| I want to create a tile based map with the map data stored in a file the program will read the data one unit at a time and store the char in an array of files example: file1.txt "wwwggww" in the program I want to do something like: file.open("file1.txt"); for (int i = 0; i < 7; i++) file >> tiles[i]; I don't know how to do this in C# |
||||
|
||||
![]() lightbringer Member since: 4/18/2005 From: Vienna, Austria |
||||
|
|
||||
| Look into the IO documentation for C#. You need to use something like System.IO.FileStream(). Here's a random tutorial that looks decent. Cloud Node // 815.2 | Solariad |
||||
|
||||
![]() boehmz Member since: 2/19/2009 From: lees summit, MO, United States |
||||
|
|
||||
| thanks, the streamreader part through me off. I was looking for methods under filestream and wasn't finding it. |
||||
|
||||
All times are ET (US)![]() |
Last Thread Next Thread ![]() |
|