Search:

Type: Posts; User: compnub1

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    18
    Views
    2,148

    Yippeee, I finaaly got the search function...

    Yippeee, I finaaly got the search function working.

    Took me long enough to realise I wasnt skipping the space character which was casuing all the trouble.

    I would like to take this chance to...
  2. Replies
    18
    Views
    2,148

    The strcmp is used to recoginze to word search as...

    The strcmp is used to recoginze to word search as a command.

    once it noticeds the command it then goes go on to the search pharse and compares it to the contents of the array.
  3. Replies
    18
    Views
    2,148

    Ok i correct my mistakes and it still doesnt...

    Ok i correct my mistakes and it still doesnt work. The program does not reconginse the search command and simply ignores it. Also I can only have two command line arguements when i run the program....
  4. Replies
    18
    Views
    2,148

    str[][] is the array where i store the lines of...

    str[][] is the array where i store the lines of data from a sample file.

    Then i run the program like this ./program text1.txt

    and then my function is supposed to search for words in the file.
    ...
  5. Replies
    18
    Views
    2,148

    Ok i put a null character at the back of char...

    Ok i put a null character at the back of char input2 and char input3. I then I used the a loop to get the position by using strlen and then going backwards until it hits the space. I then assign the...
  6. Replies
    18
    Views
    2,148

    OK I tried using a loop to spilt the strings up...

    OK I tried using a loop to spilt the strings up but when i type in search and a search phrase nothing happens. I dont understand why this is happening. Could someone plz tell me why because i have...
  7. Replies
    18
    Views
    2,148

    How do you peel of the first word and treat...

    How do you peel of the first word and treat everything else as the remaining line.
    Can some1 plz post an example on how to do it because im at a lost of how to do it. Also Im not sure if my strstr...
  8. Replies
    18
    Views
    2,148

    problem is the search term might be more then 1...

    problem is the search term might be more then 1 search term like "search blah blah"

    sscanf stops when there is a space.


    :(
  9. Replies
    18
    Views
    2,148

    search function failure

    Hi there.

    I have problems with my search function when i read in the command search and then also read in the word that needs to be searched. eg when i enter the command "search blah" it it...
  10. Replies
    7
    Views
    1,113

    MK27 yourr a geniussssss!!!!!!!!!! It works now....

    MK27 yourr a geniussssss!!!!!!!!!! It works now.

    Thanks for the tip :):)

    However is it bad style to have many EXIT_SUCCESS in your program.
  11. Replies
    7
    Views
    1,683

    maybe make d an array like this char d[100]; ...

    maybe make d an array like this

    char d[100];

    and to terminate string maybe use d*='/0'
    pend a null character to end of string maybe.

    im not sure about this though
  12. Replies
    7
    Views
    1,113

    Yea I noticed that and corrected it but it still...

    Yea I noticed that and corrected it but it still doesnt solve why the first while loop isnt working.

    eg. while(!EXIT_SUCCESS){

    printf("Enter command > ");

    This loop is supposed...
  13. Replies
    7
    Views
    1,113

    promting command

    Hi everyone,


    I am having trouble trying to keep printing the promt "Enter command >" .It only prints the promt once and then doesnt work. Can some1 tell me why cause i have spent ages...
  14. Thread: File read

    by compnub1
    Replies
    7
    Views
    1,531

    i got to keep printing Enter command > when the...

    i got to keep printing Enter command > when the user has not finish issuing commands and then the program ends itself through the command quit. So how do i do this and at the same time compare it to...
  15. Thread: File read

    by compnub1
    Replies
    7
    Views
    1,531

    I have to keep the file open so that it can keep...

    I have to keep the file open so that it can keep printing "Enter command >". Also i dont get what you mean by fgets hosing the strcmp. The print command only works once and the exit command doesnt...
  16. Thread: File read

    by compnub1
    Replies
    7
    Views
    1,531

    Ok i got rid of the multiple fgets and it works...

    Ok i got rid of the multiple fgets and it works but y does the command print not work after the first time??
    Also when i enter the command quit the program wont close itself?/ why is that?


    ...
  17. Replies
    6
    Views
    2,662

    Maybe you can be the star in the middle like this...

    Maybe you can be the star in the middle like this for better style.



    FILE * fp
  18. Thread: File read

    by compnub1
    Replies
    7
    Views
    1,531

    File read

    Hi there,

    I am having some problems prompting the user to enter a command in.

    for example i want the command"print" to be recongised multiple time.

    Its supposed to behave like this: Enter...
  19. Thread: Read string

    by compnub1
    Replies
    2
    Views
    1,057

    Oh i got it . Damn it i am such a doushe. ...

    Oh i got it .


    Damn it i am such a doushe.

    :rolleyes:

    My corrections
  20. Thread: Read string

    by compnub1
    Replies
    2
    Views
    1,057

    Read string

    Hi there,

    I was writing a program to read in a string and print it out in reverse. But for some reason it doesnt compile.The error said

    In function ‘main’:
    error; too few...
  21. Thread: sort function

    by compnub1
    Replies
    21
    Views
    2,348

    Thank to everyone who helped me :) I finally...

    Thank to everyone who helped me :)

    I finally got there in the end by using this.

    thnx again guys.



    if(price[i] > price[i+1]|| (price[i]==price[i+1] && year[i]>year[i+1])||...
  22. Thread: sort function

    by compnub1
    Replies
    21
    Views
    2,348

    So how would i phrase my if statement. Can...

    So how would i phrase my if statement.

    Can some1 plz write a example of wat to do as the work is due soon..
  23. Thread: Need help

    by compnub1
    Replies
    107
    Views
    12,552

    Why is every1 wasting time to respond to him!! ...

    Why is every1 wasting time to respond to him!!

    come help people with problems like me.
  24. Thread: sort function

    by compnub1
    Replies
    21
    Views
    2,348

    Does any1 have any ideas??? Cause I have...

    Does any1 have any ideas???


    Cause I have been trying to fix this for 2 days with no success.
  25. Thread: sort function

    by compnub1
    Replies
    21
    Views
    2,348

    Ok I did what u said but now im getting an...

    Ok I did what u said but now im getting an infinite loop.

    any ideas why??



    for(i=0; i < len-1 && retval == 0; i=i+1){

    if(price[i] > price[i+1]){
Results 1 to 25 of 32
Page 1 of 2 1 2