they are in separate lines..
as:
it
to
and
and
on
to
Type: Posts; User: axe
they are in separate lines..
as:
it
to
and
and
on
to
int main()
{
FILE *fp;
FILE *fq;
char c[100],raw_data[10000];
char *get;
char file_data[50000];
int n,i,j; int line, *found;
struct Inode *head=NULL, *tail;
...
i also tried using array of chars but got the same results...
I used the following but still gave the same results... U have an idea why?
for(i=0;i<count;i++)
{
for(j=0;j<k;j++)
Both inputs are in from a file.... i tried correcting the strcmp "if(!strcmp(aqq[i],arr[j]))" but they and all the counts print only zeros.. something like ...
The output
*********
0 times for: ...
I need some help in finding elements in array "aqq" that matchs with those in "arr"
My code just prints found as zero...
say aqq has {and, go, to, the, nowhere}
arr has {it, to, and, and,...
wow!! sweet!! thanks!!
But i need to reset found to =0 but i am comparing using more that one string
say aqq has {and, go, to, the, nowhere}
arr has {it, to, and, and, and, on, to, the, and, go, go, go}
I need some help in finding elements in array "aqq" that matchs with those in "arr"
My code just prints found as zero
for(i=0;i<count;i++)
{
found=0;
for(j=0;j<k;j++)
{...
okay!! i got it!!
I am tryin to store strings in an array "aqq" but when i copy to **ar and print it only prints the last element... lets strings are :
we
you
it
not
only prints "not" 4 times
...
who knows why the while loop prints correctly while does not proceed to print with the for loop ??...
char *aqq[30000];
while(fgets(c,sizeof(c),fq)!=NULL)
{
aqq[count]=c; count++;...
note
yes... i did look at the first one and i had a problem applying strcpy thatz why i tried alil different one... it compiled but when i try to print in a separate loop, it prints only the last...
I am tryin to store strings in an array **ro in vain.... any idea why it gives a compile time error..
char **ro;
while(fgets(c,sizeof(c),fq)!=NULL)
{
*ro=c;
ro++;
}
who knows why the while loop prints correctly while does not proceed to print with the for loop ??...
char *aqq[30000];
while(fgets(c,sizeof(c),fq)!=NULL)
{
aqq[count]=c; count++;
...
here are the array declarations... don't know how to stop posting entire post in code tags..
char *arr[30000];
temp=strtok(NULL,delimiters);
arr[k]= (char*)temp;
I have arrays *arr and *aqq. I am trying to find the occurence of similar elements(strings) in the arrays...
this won't work..
for(i=0;i<=count;i++)
{
found=0;
...
thanks.... that worked!!
I am trying to store tokens in the 'arr' array but it prints wrong stuff... do you mind also explaining why it prints garbage?
char *arr[30000];
const char *delimiters=";,.1234567890 ";
...
Wow!! that worked...... thanks zacs7
It gets words from a file, each word from each line and i want to find out if the word "and" is in the list... can someone help me?
int z=0;
char *word="and";
...
hey,
I have tried to fix the code but i still get erros from the static fuctions, any idea?
i have a problem trying to fix the following errors with dll.h . I need assistance.
dll.h:46: two or more data types in declaration of `dllInit'
dll.h:46: two or more data types in declaration of...
hi,
ok how about the following that i cannot get the Longest run count:
main()
{
int x,c;
int count,num=0,best=0 ;
char *tok, buff[BUFSIZ];
count = 0 ;