Search:

Type: Posts; User: newbie30

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Thread: Simle macro

    by newbie30
    Replies
    2
    Views
    737

    Actually got it there now, what i have is:...

    Actually got it there now, what i have is:
    #define START(x) (x) == 4| (x) == 8

    If any better way let us know
    Thanks
  2. Thread: Simle macro

    by newbie30
    Replies
    2
    Views
    737

    Simle macro

    Hi All;

    Looking for hepl with a simple macro or even is it possible. I can do macro functions but this is annoying me.

    Basically i have a #define called START. I want start to have two...
  3. Replies
    5
    Views
    10,434

    Thanks for the replies . Basically my unsigned...

    Thanks for the replies .

    Basically my unsigned char array will hold 0x00 0x00
    if value is 144 Dec i like it to be 0090 in array in hex. so maybe i should use %x in sprintf?

    thks
  4. Replies
    5
    Views
    10,434

    Help adding leading zero's to a char!!

    Hi all;

    I basically want to add leading zero's to a char when going from int to a char in snprintf.

    See example :



    unsigned char len[2];
    int length = 144;
  5. Thread: Research Help

    by newbie30
    Replies
    3
    Views
    1,481

    I was more so looking for people's opinions what...

    I was more so looking for people's opinions what they used than jsut going by wikipedia.

    Surely as engineers we must have opinions on tools????
  6. Thread: Research Help

    by newbie30
    Replies
    3
    Views
    1,481

    Research Help

    HI;

    I am doing a project on looking at free ware memory leak tools for C on linux.

    Now i know there is the commerical ones ie Purify which is a great tool but I like to know what you use and...
  7. Replies
    1
    Views
    2,312

    openlog on linux anyone???

    HI


    We used openlog here and I was wondering do any one know why it prints out
    "calling openlog() with 160" on startup on the terminal ???? It has to do with the option part which we have set...
  8. Replies
    2
    Views
    759

    Would this cause a core on Linux

    struct TMP *tmp
    char *buf_ptr;


    buf_ptr = tmp->tr[i].ch_ptr;
    tmp->tr[i].ch_ptr = NULL



    tmp is a pointer to a struct TMP and tr is another pointer to another struct within tmp.
  9. Replies
    1
    Views
    2,142

    state machines

    Hi;

    Can someone point me to a good tutorial of state machines in C and good examples also.

    Thanks
  10. Replies
    3
    Views
    2,026

    Grand cheers for that, just couldnt remember if...

    Grand cheers for that, just couldnt remember if it was ok or not. Size is grand as all taken care of!

    Thanks
  11. Replies
    3
    Views
    2,026

    quick memcpy question

    I have an array and also a buffer of char*

    I have memcpy from buffer into the array, is this ok or should i memcpy into another buffer of char* and free it when done?

    I dont have to free an...
  12. Replies
    3
    Views
    1,255

    cheers always get those slashes wrong! buf2...

    cheers always get those slashes wrong!

    buf2 will have enough space.
  13. Replies
    3
    Views
    1,255

    Quick question on pointers

    If i have the a pointer called buf1 and it contains aload of data, is it ok to do the following:




    char *buf2

    memset(buf2, '/0' 70);
    strncpy(buf2, buf1, 70);
  14. Replies
    5
    Views
    1,579

    Help with pointers and a function

    Right i have the following:





    char *G_PTR = NULL //its a global

    in a module i have this
  15. Replies
    4
    Views
    962

    Thats great but my problem is i want to assign...

    Thats great but my problem is i want to assign something to the array at global scope.??

    Sorry should of said that!
  16. Replies
    4
    Views
    962

    Quick struct question

    I have this say:


    struct temp1 {
    char *p;
    short len;
    };

    Later on i have this : struct temp1 ARRAY[] = { some stuff};
  17. Replies
    2
    Views
    1,382

    memcpy question

    Say we have 2 arrays of size ten, the second array as 6 ints in it.
    If i do a memcpy(array1, array2 10);
    Will i get rubbish in the after the 6 spot in the array1 or will memcpy set them to null;...
  18. Replies
    1
    Views
    2,897

    Parity check ideas

    Hi;

    I have a project where i am doing some parity checking.

    Basically i have an array that contains values that cant be parity, ie 3,5,9 etc.

    A buffer filled with a message of bytes .

    So...
  19. Replies
    22
    Views
    13,565

    Read my post above. Ask yourself what you need...

    Read my post above.
    Ask yourself what you need to do next logical before programming and look up what i said above.
  20. Replies
    22
    Views
    13,565

    When you asked the second user for their input,...

    When you asked the second user for their input, think about how do you compare the two inputs.

    If any doubt on the compare look up switch statements, if statements, loops.

    These are things you...
  21. Replies
    22
    Views
    13,565

    If you think about this there is not too much for...

    If you think about this there is not too much for it.

    You need to take in char type from each user.
    Create an if statement to do the compare
    Print your result!!


    Load of examples of this on...
  22. Replies
    1
    Views
    6,094

    Socket error on non-blocking

    Hi;

    I have a client/server but i keep getting an error when i run the program. When the socket is blocking it works but non blocking it doesnt.

    Here is the server code


    #include <stdio.h>...
  23. Can you post the code including the headers

    Can you post the code including the headers
  24. Replies
    4
    Views
    1,049

    So if i have a clietn/server both non blocking...

    So if i have a clietn/server both non blocking and i want to send data across i should not use the select option on the server side???

    I write some rough code here but hope you get what i mean as...
  25. Replies
    2
    Views
    11,257

    Thanks for that, if you could answer my question...

    Thanks for that, if you could answer my question on the sockets in the other post be great, as totally confused myself with the non blocking stuff
Results 1 to 25 of 58
Page 1 of 3 1 2 3