Why does it take 12 posts to finally get somewhere?
I have been more than upfront about my lack of understanding here.
I have lost all respect and faith in this forum.
People here may be...
Type: Posts; User: jkgoose937
Why does it take 12 posts to finally get somewhere?
I have been more than upfront about my lack of understanding here.
I have lost all respect and faith in this forum.
People here may be...
so if i'm understanding:
a: sscanf(buffer,"%[^,], %[^,], %[^,]", get_info.user_ID, get_info.pass_word, get_info.user_flag, *, *, *,) == 3);
or
b: sscanf(buffer,"%[^,], %[^,], %[^,], *, *, *",...
yeah, that doesn't help. there again no information on what i'm trying to do. no examples, nothing!
...
i do have C the complete reference 4th edition, but it's vague or moot on what i'm trying to do here.
there is a bit more online:
Sample C I/O: Student Records | 911 programming
but again not...
i know i'm trying to do what "http://911programming.wordpress.com/2010/05/15/sample-c-io-student-recods/" is doing.
so because i only really need the first 3 variables it should be:
sscanf(buffer,"%[^,], %[^,], %[^,]", get_info.user_ID, get_info.pass_word, get_info.user_flag) == 3);
so if the above is true,...
sscanf(buffer,"%[^,], %[^,], %[^,], %[^,], %[^,]", get_info.user_ID, get_info.pass_word, get_info.first_name, get_info.last_name, get_info.user_flag) == 1
sscanf: is reading within the file by...
Could you expand on your answer?
Really I could type in random stuff into my code to what I think it is, but that's not going to help me.
Had I been given information like on page 2 from the...
I was fortunate to get an extension on this part, so i don't have to the time to invest or investigate into why this is not working.
My logic states it should work but I cant see why it's not. ...
thank you for all your help thus far, but really i'm out of time on this
project, but really it is what it is... nothing more..
i may revisit this at a later time and take time to do the baby...
user.pwd file:
17556, yellow, S, happy, feet
402636, black, U, hello, world
22140, blue, U, dustin, trans
171820, purple, S, justin, moore
ok i haven't given up yet but still need help i've been given the suggestion to "bring in" strings via a struct.
i think this is how to do it but really seems weird. i know i'm over my head here...
this project is going to be too hard for me to do, i may have to give up on it. the help so far at this forum has be been ambiguous at best.
my hope from this forum was more instruction on how...
i didn't mean to do your work for you, but think about what's going on there. your grabbing [stdin] and placing into '&[memory]' the [memory] then gets placed it into "%s".
Try starting off with just the basics of the program like:
#include <stdio.h>
int main ()
{
char first_name[20];
char second_name[20];
I haven't been able to make any head way on this. I can enter the userid and password then the program vomits and dies.
any other suggestions?
void auth_user()
{
char password;
...
yeah, i know, that's why we're doing this exercise... sink or swim!
thank you deeply. i have something to work.
yeah, i know, that's why we're doing this exercise... sink or swim!
thank you deeply. i have something to work.
how would i extract the 'int'? aka userid from the file?
here's the entire function:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define FNAME1 "user.pwd"
i know i'm using the functions wrong and don't know how to properly use them and maybe even going about this the wrong way but this is what i have so far:
else
{
user_db_file...
any one have any thoughts as to how to help get this to work?
my biggest problem here is i just don't have a clue on how to use strcmp or fscanf or fgets.
i'm not asking for anyone to write code for me, but really more example of how to modify this so i...
so does this look like i'm on the right track here?
...
else
{
user_db_file = fopen(FNAME1, "r");
while(fgets(file_string,50,user_db_file) != NULL)
ok so this is kinda where i'm going with this and really need help understanding how this works.
please help.
char password;
char get_pswd
int userid;
int get_ID