Search:

Type: Posts; User: Tommo

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    20
    Views
    2,878

    You can take this course...

    You can take this course and study it yourself.
  2. Replies
    1
    Views
    2,248

    LU Decomposition...

    LU Decomposition
  3. Replies
    6
    Views
    1,560

    I doubt you can do this. This gave me decimal...

    I doubt you can do this. This gave me decimal 73. Nowhere in that link you provided does it say you can do this.
  4. Replies
    4
    Views
    1,269

    Link (http://c-faq.com/osdep/cbreak.html)

    Link
  5. Replies
    6
    Views
    1,700

    Yes, my apologies. At first glance his taylor...

    Yes, my apologies. At first glance his taylor function looked incorrect. Disregard my previous post.
  6. Replies
    6
    Views
    1,700

    Your taylor function doesn't look right to me....

    Your taylor function doesn't look right to me. Maybe you need to refresh your memory.

    Here's my quickly cooked up solution:


    #include <stdio.h>
    #include <stdlib.h>
    #include <math.h>
    ...
  7. Replies
    3
    Views
    1,703

    //function to set up the list. List *somelist(...

    //function to set up the list.
    List *somelist( char word[], List *tl ) {
    List *t = (List*) malloc (sizeof(List));
    strcpy(t->word, word[LENGTH]) ;
    t->next = tail;
    return t;
    }


    And in...
  8. Replies
    13
    Views
    14,459

    fpLogFile = fopen(logFileName,"w"); Have you...

    fpLogFile = fopen(logFileName,"w");


    Have you declared fpLogFile globally? If not, you need to declare it somewhere.
  9. Replies
    2
    Views
    1,434

    thanks brewbuck

    thanks brewbuck
  10. Replies
    2
    Views
    1,434

    Endianness - Is this correct?

    Hi, I was just reading some article when I stumbled across this. It's making me question my knowledge of endianness. It says:



    For example lets say we are going to store a 2-byte number
    ...
  11. Replies
    29
    Views
    4,725

    > Do I need to allocate memory for i? No. >...

    > Do I need to allocate memory for i?

    No.

    > p = (some_typ *)malloc(sizeof(p));

    Don't cast malloc. Also i think you'll be wanting sizeof(struct some_type) (or sizeof(*p)).

    > is it only for...
  12. Replies
    4
    Views
    17,179

    There must be some way. I haven't managed to do...

    There must be some way. I haven't managed to do it, the attached code shows my attempt. Useless. Hopefully, someone with more experience will enlighten us.
  13. Replies
    4
    Views
    17,179

    Hmm good question. I'll have a little play with...

    Hmm good question. I'll have a little play with fork(), seems like it should work. If you're not bothered about which method to use, you should use select() to do this, the link even provides an...
  14. Thread: Global Variables

    by Tommo
    Replies
    34
    Views
    8,942

    Well, what do you think? Lets look at a very...

    Well, what do you think?

    Lets look at a very simple example:


    int a;
    int b;
    int add() {
    return a+b;
    }
  15. Replies
    14
    Views
    17,292

    Do you not mean "lseek in do_this: Illegal seek"?

    Do you not mean "lseek in do_this: Illegal seek"?
  16. Thread: Global Variables

    by Tommo
    Replies
    34
    Views
    8,942

    Define the variables in main(), then pass them to...

    Define the variables in main(), then pass them to the functions.
  17. Replies
    8
    Views
    1,327

    Without ncurses...

    Without ncurses
  18. Replies
    8
    Views
    9,972

    Easy fix...

    Easy fix

    Ye I think having a look at some examples will give you a better understanding. Qsort basically lets you sort data to the way you want (ascending,descending etc) by letting you pass your...
  19. http://security-freak.net/raw-sockets/raw-sockets....

    http://security-freak.net/raw-sockets/raw-sockets.html
    http://packetstormsecurity.nl/programming-tutorials/raw_socket.txt



    Yes, even though I havn't read it, it is regarded as the best book on...
  20. Replies
    2
    Views
    2,393

    Yes poll()...

    Yes poll() or select() is what you're looking for.
  21. Replies
    2
    Views
    2,751

    OK, I think I have the gist of it. I played...

    OK, I think I have the gist of it. I played about with Beej's selectserver.c example and managed to create a server that pairs two clients together and they can exchange messages. Fairly simple. ...
  22. Replies
    2
    Views
    2,751

    Simple game over network

    Hi there.

    I am attempting to write a simple game over a network. Have you ever seen the game 'Anagrammatic' before? Well it's that but simpler. Basically, a client connects to a server and the...
  23. Replies
    12
    Views
    4,706

    OK, got it working by changing 'pattern' to...

    OK, got it working by changing 'pattern' to "class=\"results\">" and changing the function to:



    int WordisinDictionary( char *buffer, char *pattern ) {

    char *ptr;
    int len;
    if( ( ptr =...
  24. Replies
    12
    Views
    4,706

    Thanks matsp. I realise why it doesn't work...

    Thanks matsp.

    I realise why it doesn't work now. The pattern may not appear when I fill my buffer for the first time, say, so wordisindictionary() returns 1 and breaks from the loop, therefore...
  25. Replies
    12
    Views
    4,706

    @ Dave_Sinkula: Sorry I seem to have confused...

    @ Dave_Sinkula: Sorry I seem to have confused you. If the pattern matches then the word was not found, so if strstr( buffer, pattern ) is NULL, then the pattern was not found and so the word does...
Results 1 to 25 of 105
Page 1 of 5 1 2 3 4