Took your advice and here is what I came up with. Unfortunately, it still doesn't work how I would like it to... o.0 But I believe it's a drastic improvement from the previous post =) thank you for...
Type: Posts; User: Alexander87
Took your advice and here is what I came up with. Unfortunately, it still doesn't work how I would like it to... o.0 But I believe it's a drastic improvement from the previous post =) thank you for...
I feel stupid now lol.... I thought I understood but I was wrong... tried dereferencing and a few other things still not working out for me o.0....
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
struct employee
{
char firstName[20];
lol you're like a Professor testing me on something I didn't study for =). I really don't know the difference but your question made me look up just that. It basically said that strn was added later...
fgets accepts arguments and you can specify length and strncpy/strcpy - since C makes you do arrays for string it makes it easier to do a string instead of filling
char string[3] = {J,o,e};
strcpy vs strncpy? Pros / cons??
pinput = fgets(input, 30, stdin);
strncpy(my_struct.firstName,pinput,30);
fgets(input["I understand"],30["I understand this"], stdin["I don't...
I took it off because I knew I needed to change it however... I didn't know to what so I suppose I must have forgot about it. I would like it to accept the struct fields properly .However, I am...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define BUFF 120
#define SIZE 9
#define STND 20
#define CLIENTS 50
Why oh why will this code not work? It cashes the program on me once i get to it...
memset(&input, 0, sizeof(input));
printf("Enter your firstname: ");
pinput = fgets(pinput,...
Malcolm what do you suggest instead??
Andi I just want that function to get the client fields and validate names as alphas and the account # as digits and I haven't figured out how to write a...
This is my first post, I have used this site as a resource since I started my intro to C this semester, just wanted to thank you guys for the vast source of knowledge.
now here is what I have...