Search:

Type: Posts; User: sillyman

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,519

    I just have never done this before. Linked list...

    I just have never done this before. Linked list are still new to me. So if it works. it is correct :-)
  2. Replies
    4
    Views
    1,519

    This is what I have for the swap code. ...

    This is what I have for the swap code.



    int change = 1;
    char word[80];
    while ( change )
    {
    change = 0;
    current = start;
  3. It couldn't be as simple as this are the values...

    It couldn't be as simple as this are the values set in those pointers. Could it?
  4. Replies
    4
    Views
    1,519

    sorting a linked list

    What is the proper way to sort a linked list. This was all I could think up.



    int change = 1;
    while ( change )
    {
    change = 0;
    ...
  5. Replies
    15
    Views
    3,082

    true, about the c part, but for perl look up...

    true, about the c part, but for perl look up function

    finddepth

    are you trying to create the Unix find command?

    for c programming try ftw function.
  6. Replies
    15
    Views
    3,082

    or try ./ are you sure that is right path name?

    or try ./ are you sure that is right path name?
  7. Replies
    15
    Views
    3,082

    Your code is correct. Check the perms on the...

    Your code is correct. Check the perms on the directory.
  8. Replies
    15
    Views
    3,082

    which platform are you writing this for? Windows,...

    which platform are you writing this for? Windows, Mac, Solaris, AIX, HP-UX, Linux?
    Are you sure you have a tmp directory?
  9. Replies
    15
    Views
    3,082

    try this #!/usr/bin/perl -w $dirname...

    try this




    #!/usr/bin/perl -w

    $dirname = "/tmp";

    opendir ( DIR, $dirname ) || die "Error in opening dir $dirname\n";
  10. Replies
    12
    Views
    2,265

    #include int a = 1; int test() {...

    #include <stdio.h>

    int a = 1;

    int test()
    {
    return (4 + a);
    }

    int main(void)
  11. Replies
    5
    Views
    5,524

    Maybe this will help too? int main(int...

    Maybe this will help too?



    int main(int argc, char *argv[])
    {
    printf("Program Name: &#37;s\n", argv[0]
    printf("Arg1 = %s", argv[1])

    return 0;
  12. Replies
    5
    Views
    5,524

    C programs start with 3 open file handles 0 =...

    C programs start with 3 open file handles
    0 = stardard input
    1 = standard output
    2 = standard error

    How is the user going to specify the file. Maybe by a command line argument?

    argv[1]
  13. I see. So in reality it means about as much to...

    I see. So in reality it means about as much to stdin as rewind would. thanks.
  14. The situation where fflush doesn't work as...

    The situation where fflush doesn't work as excepted. This is my first time using it and it seemed to work. What situation caused you to notice that it returned unpred results? and learn this...
  15. Sorry, It was for Elysia. When did you first...

    Sorry, It was for Elysia. When did you first encouter the situation?

    Perhaps, I should just skip that and feed your ego ;-)
  16. So I replaced fflush(stdin). Is this better? ...

    So I replaced fflush(stdin). Is this better?


    #include <stdio.h>

    int main()
    {
    int number=10, ch;
    const char *numbers[] = { "Zero", "One", "Two", "Three", "Four",
    ...
  17. How did you learn about that in the first place?

    How did you learn about that in the first place?
  18. Okay, thanks. I never tried it before. So a...

    Okay, thanks. I never tried it before. So a better option would be to use non-buffered input?
  19. Why would a college student working on an...

    Why would a college student working on an exercise type in EOF on a simple programming example? Can you give me an example of how to enter EOF into the program?
  20. Thread: Array help

    by sillyman
    Replies
    8
    Views
    1,118

    #include int main(void) { ...

    #include <stdio.h>

    int main(void)
    {
    int b, c;
    float a[5][5];

    //'init array a
    for ( c=0; c < 5; c++)
    {
  21. cute, ok. I agree totally... plus some error...

    cute, ok. I agree totally... plus some error checking ;-)



    #include <stdio.h>

    int main()
    {
    int number=10;
    const char *numbers[] = { "Zero", "One", "Two", "Three",...
  22. laserlight has an excellent idea. The code might...

    laserlight has an excellent idea. The code might look something like this. Just to clarify.



    #include <stdio.h>


    int main(void)
    {
    int number=0 ;
  23. Replies
    8
    Views
    4,389

    I would use the qsort .... bubble sorts are fun...

    I would use the qsort .... bubble sorts are fun and good for smaller datasets.

    Anyway here is the array example followed by your request for the output file example too.

    9 element array

    ...
  24. Replies
    8
    Views
    4,389

    1) You are looking for the end of line character...

    1) You are looking for the end of line character (\n) it tells the command line to drop down one row.
    2) You have to create a data store like an character array or a linked list. My example uses a...
  25. Replies
    8
    Views
    4,389

    This code reads (based off your code) every char...

    This code reads (based off your code) every char or byte at a time and writes every byte to a sperate file. This isn't what you are saying you want to do. Technically it is wrong.



    #include...
Results 1 to 25 of 33
Page 1 of 2 1 2