Search:

Type: Posts; User: patso

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,576

    Need help copying files into strings???

    Hi again!

    I am taking a file and tokenizing the comma separated variables into strings and suppose to take each variable and put it into a 5 variable per line string.

    Any help would be...
  2. Replies
    3
    Views
    1,673

    I see where I went wrong. @smokeyangel...

    I see where I went wrong.

    @smokeyangel
    Thank you for showing me this. I appreciate this more than you will know. I believe I understand now how you went about this.

    I followed that with...
  3. Replies
    3
    Views
    1,673

    How to use struct for this purpose?

    STEPS:
    1. Declare an input string as follows:
    char InputString[] = "the dog thought up a lie done";
    Note that "done" is the last word that appears in the sentence, but not part of the sentence...
  4. what does system("PAUSE"); mean?

    what does
    system("PAUSE");
    mean?
  5. Thread: Random numbers

    by patso
    Replies
    14
    Views
    2,110

    use it in conjunction with % (mod) to randomly...

    use it in conjunction with % (mod) to randomly generate as many numbers up to the desired number.
  6. Replies
    15
    Views
    3,774

    it is for an intro to algorithms course. It is...

    it is for an intro to algorithms course. It is first year second semester
  7. Replies
    15
    Views
    3,774

    i believe so

    i believe so
  8. Replies
    15
    Views
    3,774

    this is the part I don't understand. do you...

    this is the part I don't understand. do you count the numbers as words to count back?
  9. Replies
    15
    Views
    3,774

    ok, I am sorry, how would I get the index. ...

    ok, I am sorry, how would I get the index. Feengur and itCbitC, how are you figuring this out?
  10. Replies
    15
    Views
    3,774

    Compress and uncompress? Please help....

    I don't understand what is being asked.
    I don't want the code, I just want to know how to go about it and where to look for examples of this.

    A simple scheme for creating a compressed version...
  11. Replies
    34
    Views
    6,323

    yes that would good to see. The more info I...

    yes that would good to see. The more info I learn the better.
    How would I put *b[] into equal lengths? Would there be a set way of doing it?
  12. Replies
    34
    Views
    6,323

    input in red Displaying contents of *b[]dd...

    input in red

    Displaying contents of *b[]dd
    aa
    cc
    e
    f
    b

    press enter to continue
  13. Replies
    34
    Views
    6,323

    works great for single inputted letters, as soon...

    works great for single inputted letters, as soon as there is more it gets screwed up
  14. Replies
    34
    Views
    6,323

    this is the output print a line:asdf This is...

    this is the output
    print a line:asdf

    This is a loop
    This is the second buffer
    asdf
    The line to print:
    asdf
    The new line is:
    fdsa
  15. Replies
    34
    Views
    6,323

    i don't know what you mean. I thought i was...

    i don't know what you mean. I thought i was using bubble sort
  16. Replies
    34
    Views
    6,323

    okay, just a few bugs and it is done.

    as soon as I go over three words, it won't alphabetize them....



    printf("Please enter the string to be parsed:\n");
    gets(buffer5);
    printf("\n");

    char *b[20];
  17. Replies
    34
    Views
    6,323

    It works for the desired number 4. But if I go...

    It works for the desired number 4. But if I go under that or over it gives me a segmentation fault. How could I get strlen in there when it is being tokenized to determine the amount of tokenized...
  18. Replies
    34
    Views
    6,323

    i have been told that I could use a bubble sort...

    i have been told that I could use a bubble sort in conjunction with strcmp to get it to sort alphabetically.

    I don't know how to go about putting the strcmp into a bubble sort.
  19. Replies
    34
    Views
    6,323

    i was just trying that to see if it would work.

    i was just trying that to see if it would work.
  20. Replies
    34
    Views
    6,323

    got it to work somewhat. It will post both just...

    got it to work somewhat. It will post both just won't put in order and post repeats instead of the actual characters. won't post last character either....?
    Thought blue might be needed for base...
  21. Replies
    34
    Views
    6,323

    Here is my full code. The red area is where the...

    Here is my full code. The red area is where the tokenized strings should be checked for comparability by the first character. Giving me same problem.
    THe last thing i need and am trying to figure...
  22. Replies
    34
    Views
    6,323

    awesome, I took out the else puts ("NULL...

    awesome, I took out the

    else puts ("NULL token");


    Thank you so much.
  23. Replies
    34
    Views
    6,323

    Okay, I now know what the problem is /*Part...

    Okay, I now know what the problem is

    /*Part 4*/
    printf("Please enter the string to be parsed:\n");
    gets(buffer5);
    printf("\n");


    char *b[20];
  24. Replies
    34
    Views
    6,323

    k well, I am trying very hard to understand this....

    k well, I am trying very hard to understand this. Here is another way I tried doing it.


    char *b[20];

    b[0] = strtok(buffer5, " ,;.");

    for(i = 1; i < 20; i++){
    b[i] =...
  25. Replies
    34
    Views
    6,323

    could I essentially do this:? ...

    could I essentially do this:?


    printf("Please enter the string to be parsed:\n");
    gets(buffer5);
    printf("\n");

    tokenptr = strtok(buffer5, " ,;."); /*Begins...
Results 1 to 25 of 57
Page 1 of 3 1 2 3