473,321 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

storing word from a file into 2d array

16
hello,
i am having trouble storing word from a text file into a 2d array in C. the array size is 20 by 20 and i am required to store one word in each row. For some reason i don't get how to use a nested for loop to switch to next row after reading the first word.
This program is for sorting the words lexicographically into another text file.I am not allowed to use string header for this.
any help would be appreciated
thanks
Oct 3 '06 #1
1 3579
D_C
293 100+
I'm not sure exactly how you mean to traverse the array, an example would have helped. I assume you want to go across one row, then across the next row, until the last row.
Expand|Select|Wrap|Line Numbers
  1. for(int row = 0; row < NUM_ROWS; row++)
  2.    for(int col = 0; col < NUM_COLS; col++)
Oct 3 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Noam Dekers | last post by:
Hi all, I would like to find a word stored in a text file. Structure: I have one file named keyWords.txt that stores some key words I'm interested in finding. In addition I also have a file...
2
by: David Horowitz | last post by:
Hi folks, I want to be able to store and retrieve UNSAVED Word documents as BLOBs. I got all the info for storing them if they're already saved on the file system. But what if they're not...
7
by: Arnold | last post by:
I need to read a binary file and store it into a buffer in memory (system has large amount of RAM, 2GB+) then pass it to a function. The function accepts input as 32 bit unsigned longs (DWORD). I...
5
by: Don Vaillancourt | last post by:
I'm building a system when one can upload a document to the website. I will be storing the document on the hard-drive for quick/easy access, but I was also thinking of storing it in an existing...
8
by: Frost | last post by:
Hi All, I am a newbie i have written a c program on unix for line by line comparison for two files now could some one help on how i could do word by word comparison in case both lines have the...
6
by: (PeteCresswell) | last post by:
User wants to go this route instead of storing pointers in the DB and the documents outside. Only time I tried it was with only MS Word docs - and that was a loooong time ago - and it seemed to...
8
by: Jay | last post by:
I'm trying to store a sequence of operations and values of different types into a single array. It's a sequence of command word bytes, and a sequence of one or more values (as determined by the...
10
by: deciacco | last post by:
I'm writing a command line utility to move some files. I'm dealing with thousands of files and I was wondering if anyone had any suggestions. This is what I have currently: $arrayVirtualFile =...
2
by: hangman1060 | last post by:
The goal is to read the words from a text file and store them in 2D array. Pointers aren't allowed. I have been struggling with this for a while and help with would be much appreciated. This is what...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.