Search:

Type: Posts; User: JimpsEd

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    823

    Best cryptographicaly-secure RNGs?

    In writing software that requires CSPRNGs, what is the prefered method (for you) in generating them (non-standard library as well as standard library)?
  2. Replies
    2
    Views
    1,556

    Solved. packet is a pointer, so to access a...

    Solved.

    packet is a pointer, so to access a member I need to use ->
  3. Replies
    2
    Views
    1,556

    Structure / Union Error

    cli_reliable.c: In function `rel_receive_packet':
    cli_reliable.c:46: error: request for member `header' in something not a structure or union

    When compiling with the latest gcc. Here is the...
  4. Replies
    4
    Views
    2,158

    (Eg. an array of strings)

    (Eg. an array of strings)
  5. Replies
    4
    Views
    2,158

    Variable Data Structure

    I am going to have a data structure that stores a name, and associated with this name will be a list of codes.

    However, there can be any number of codes in this list associated to the name.

    I...
  6. Thread: Repeat scanf?

    by JimpsEd
    Replies
    4
    Views
    3,081

    Got it working :) void ask_dumptype( ) { ...

    Got it working :)


    void ask_dumptype( )
    {

    /*
    int dumptype = global
    */
  7. Thread: Repeat scanf?

    by JimpsEd
    Replies
    4
    Views
    3,081

    How do you use fgets() to read from console input?

    How do you use fgets() to read from console input?
  8. Thread: Repeat scanf?

    by JimpsEd
    Replies
    4
    Views
    3,081

    Repeat scanf?

    Hi there;

    I want to repeatedly check for input using scanf if a given input is "invalid". I have made my code, but it seems if I enter a "wrong" value, it will loop and crash - spewing the...
  9. Replies
    1
    Views
    1,551

    Simple list code

    I am making a simpel list code example for something, and I've got a bug I can't solve (should I be the one teaching here....? :confused:)

    Anyway;


    #include <stdlib.h>
    #include <stdio.h>...
  10. Replies
    2
    Views
    13,478

    Writing the post was an inspiration in itself for...

    Writing the post was an inspiration in itself for me :)



    void striptrailspace( char *line )
    {

    int i = strlen(line) - 1;

    while ( i > 0 )
  11. Replies
    2
    Views
    13,478

    Removing leading and trailing whitespace

    Hi;

    I want a way to remove leading and trailing whitespace from a string. I imagine i'm going to be making use of a loop and isspace(), but beyond this I cannot think how I can take in an array,...
  12. Replies
    5
    Views
    1,818

    Regular expressions

    Hi there;

    I know what regular expressions are, and have used very simple ones before - but I don't know if they can be used in C, or how to use them. I do know, though, that regex would save me a...
  13. Replies
    5
    Views
    1,240

    Thanks everyone for your help - I went with this...

    Thanks everyone for your help - I went with this solution, and it works :)


    void replacecommas(char *line)
    {
    char *p;

    while((p = strchr(line, ',')))
    {
    *p = ' ';
  14. Replies
    5
    Views
    1,240

    Passing pointers to an array

    Hi there;

    I want to pass a pointer to an array to a function, so my second function can modify the array.

    The problem I am coding for is a string - searching for commas and replacing them with...
  15. Replies
    11
    Views
    1,492

    Ok got it working :) Except for one problem now....

    Ok got it working :) Except for one problem now. The printlist() function prints a "0" at the first print.. but I can't see why:



    typedef struct list {
    int number;
    struct list *next;
    }...
  16. Replies
    11
    Views
    1,492

    Hi; Thanks again for your help. I now get...

    Hi;

    Thanks again for your help.

    I now get the following warning, and still no printing:
  17. Replies
    11
    Views
    1,492

    Ok, got that fixed. Now my printlist function...

    Ok, got that fixed. Now my printlist function isn't printing anything...
  18. Replies
    11
    Views
    1,492

    Ok, here is my code again. It falls over at; ...

    Ok, here is my code again.

    It falls over at;

    /* DEBUG */ printf("tail set to temp.\n");
    tail = temp;
    with a seg fault.
  19. Replies
    11
    Views
    1,492

    Another List Q - Seg fault on head-tail list

    And I am completely stumped as to why i am getting it.. for all intents and purposes, I cannot see a flaw (by eyeballing the code).





    typedef struct list {
    int number;
    struct list *next;...
  20. Replies
    4
    Views
    1,278

    How do I ignore the whitespaces, say if they were...

    How do I ignore the whitespaces, say if they were deliminated by tabs instead?
  21. Replies
    4
    Views
    1,278

    Probllem I'm Solving

    Hi there;

    I need a help with a problem I am trying to code around.

    I need to take in a line - in the form "xxx $y, $y, $y". The line is always in this form. xxx can be any character, and the...
  22. Replies
    22
    Views
    1,945

    Return a string

    Hi there;

    I want to know how to get a function to return a string in C. I know it cannot be done by simplying returning a character array, any ideas?
Results 1 to 22 of 22