delorie.com/archives/browse.cgi | search |
From: | "Daniel Eliasson" <danieleliasson AT chello DOT se> |
Newsgroups: | alt.comp.lang.learn.c-c++,comp.lang.c++,comp.os.msdos.djgpp |
Subject: | Need some help with reading from files |
Lines: | 23 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.50.4522.1200 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4522.1200 |
Message-ID: | <nj7x6.782$ym1.6435@nntp1.chello.se> |
Date: | Fri, 30 Mar 2001 21:57:39 GMT |
NNTP-Posting-Host: | 193.150.238.248 |
X-Complaints-To: | abuse AT chello DOT se |
X-Trace: | nntp1.chello.se 985989459 193.150.238.248 (Fri, 30 Mar 2001 23:57:39 MET DST) |
NNTP-Posting-Date: | Fri, 30 Mar 2001 23:57:39 MET DST |
Organization: | chello broadband |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Hi, I'm currently working on a small game utilizing a 2d array of int's. That is, grid[128][128]. What I want to do is read a map from a text file. The format of maps is that every character in the map file is a certain type of int that will be stored in the grid..... My problem is, if I want to read the first 128 characters on the first 128 rows in the text file, how do I get the iostreams to do this? I've checked several C++ books, but they never tell me how to manipulate the place it reads from. Any code/pseudo-code would be greatly appreciated. Thanks in advance, -- // Daniel Eliasson PS. I hope you don't mind the crosspost, just trying to maximise my odds of getting help. ------------------- I believe information should be free. www.gnu.org
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |