The program I am trying to write has to stop reading data from a file at 50 names or at EOF, whichever comes first. The test data file that I'm using has 2 pieces of data in it so it should stop at...
Type: Posts; User: FastFish
The program I am trying to write has to stop reading data from a file at 50 names or at EOF, whichever comes first. The test data file that I'm using has 2 pieces of data in it so it should stop at...
Is there any way to make the strcmp ignore the difference between capital letters and lower case? My sort is working but it is putting all the words with capitals first then the lower case.
Thanks
The unreigistered guy is right. That is what I have to do. I have to put 50 words in alphabetical order. So I have to account for duplicate characters in the words. That is why I have the 2nd...
Ok here is what I'm trying to do:
for(i=0;i<50;i++) //Sorts the contents of the array
{
// for(j=0;j<20;j++)
//{
if(strcmp(word[i+1],word[i])>0)
{
...
Because when I read the array in, I have to limit the words to 20 characters or less. That is why I have the the second value.
That is what i want to do. The trouble is... I've had one class in C and that was over a year ago and I don't remember how to do that. I have the the words in the array. The array is called...
I have an array of strings that I need to sort alphabetically from a to z. What is the best way to do this? Could u please include a code sample for me to look at? :confused:
The program also says that the words must be limited to 20 characters in length. Sorry I didn't out that in the first post.
I have to write a program for school that opens a file, reads in the first 50 words of a paragraph into an array, then print the words to an output file. Everything appears to be working, but when I...