In writing software that requires CSPRNGs, what is the prefered method (for you) in generating them (non-standard library as well as standard library)?
Type: Posts; User: JimpsEd
In writing software that requires CSPRNGs, what is the prefered method (for you) in generating them (non-standard library as well as standard library)?
Solved.
packet is a pointer, so to access a member I need to use ->
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...
(Eg. an array of strings)
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...
Got it working :)
void ask_dumptype( )
{
/*
int dumptype = global
*/
How do you use fgets() to read from console input?
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...
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>...
Writing the post was an inspiration in itself for me :)
void striptrailspace( char *line )
{
int i = strlen(line) - 1;
while ( i > 0 )
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,...
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...
Thanks everyone for your help - I went with this solution, and it works :)
void replacecommas(char *line)
{
char *p;
while((p = strchr(line, ',')))
{
*p = ' ';
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...
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;
}...
Hi;
Thanks again for your help.
I now get the following warning, and still no printing:
Ok, got that fixed. Now my printlist function isn't printing anything...
Ok, here is my code again.
It falls over at;
/* DEBUG */ printf("tail set to temp.\n");
tail = temp;
with a seg fault.
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;...
How do I ignore the whitespaces, say if they were deliminated by tabs instead?
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...
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?