delorie.com/archives/browse.cgi | search |
From: | "Usulsuspct" <usu1 AT netsync DOT net> |
Newsgroups: | alt.comp.lang.learn.c-c++,comp.lang.c++,comp.os.msdos.djgpp |
Subject: | Re: Need some help with reading from files |
Date: | Fri, 30 Mar 2001 17:18:24 -0500 |
Organization: | Posted via Supernews, http://www.supernews.com |
Message-ID: | <tca1h39kn4vdb8@corp.supernews.com> |
References: | <nj7x6.782$ym1 DOT 6435 AT nntp1 DOT chello DOT se> |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.50.4133.2400 |
X-Mimeole: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
X-Complaints-To: | newsabuse AT supernews DOT com |
Lines: | 37 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
I might be off base here, but couldnt you utilize the putp, and tellp...to set the position of the read head? again.....someone more versed in C++ could probally help you better on this. "Daniel Eliasson" <danieleliasson AT chello DOT se> wrote in message news:nj7x6.782$ym1 DOT 6435 AT nntp1 DOT chello DOT se... > 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 |