Search:

Type: Posts; User: hohoholalala

Search: Search took 0.01 seconds.

  1. Replies
    19
    Views
    2,072

    Hi , thanks for your reply. Actually DELIM was...

    Hi , thanks for your reply.
    Actually DELIM was defined on top as a " " space.
    How do i convert the string to an integer?
  2. Replies
    19
    Views
    2,072

    #include #include #include...

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <ctype.h>

    #define DELIM " "
    #define BUF_SIZE 100
    void *safe_malloc(void *buf,int size);

    int
  3. Replies
    19
    Views
    2,072

    Yep actually i do get a complie error of smth...

    Yep actually i do get a complie error of smth like caldnt compare integer or something of that sort
    anyway ill try that thanks
  4. Replies
    19
    Views
    2,072

    Yep but thats what i need to do, check the first...

    Yep but thats what i need to do, check the first token in each line.
    However how do i use a switch to check if that token is equal to a certain character(regardless of if the token is a string or...
  5. Replies
    19
    Views
    2,072

    sorry i think i got the code tags the wrong way...

    sorry i think i got the code tags the wrong way round
  6. Replies
    19
    Views
    2,072

    #define DELIM " " int main( int argc , **...

    #define DELIM " "

    int main( int argc , ** argc)
    {
    char *word;


    /* get buffer of the right size */
    buf = (char *)safe_malloc((void *)buf,BUF_SIZE+1);
  7. Replies
    19
    Views
    2,072

    Yes, but what if a string was typed instead of...

    Yes, but what if a string was typed instead of just a character(for debugging purposes) would swithc still work?
  8. Replies
    19
    Views
    2,072

    Actually i wanna compare the input with a...

    Actually i wanna compare the input with a character but i am not sure how to do that since i read in the input line by line.
    Thanks
  9. Replies
    19
    Views
    2,072

    Hey thanks. But if i am reading it in line - by...

    Hey thanks.
    But if i am reading it in line - by - line what should i put in my switch statement?
    switch(??)
  10. Replies
    19
    Views
    2,072

    Help with reading in input

    Hey guys :D im new to this forum here.

    Anyway i was having a bit of a problem with a program im doing. See, i read data in line-by-line (not files) using fgets, following that i use strtok to...
Results 1 to 10 of 10