so should i? sorry im very new to this and im in a hurry... :(
void read_from_file(FILE *file, STUDENT array[20])
{
int i;
file = fopen("Students.txt", "r");
for(i = 0; !feof(file) &&...
Type: Posts; User: Huskar
so should i? sorry im very new to this and im in a hurry... :(
void read_from_file(FILE *file, STUDENT array[20])
{
int i;
file = fopen("Students.txt", "r");
for(i = 0; !feof(file) &&...
UPDATE:
ive made my code work ONLY when i enter info that doesnt contain spaces...
i can make the read_from_file and write_to_file work when my strings have no spaces...
how can i read strings...
if the arrangement of every student account in the file is like this...
STUDENT NUMBER \t NAME \t BIRTHDATE \t COURSE
i.e...
how can i transfer these info accordingly to an array of struct...
thanks sir...
but i used atol(); instead... works fine for my number which is like 9 digits
c99.h?
i used stdlib.h
but it says undefined symbol... whats wrong?
whats the correct header?
thanks sir... that makes a lot of sense....
since i initialized every stud num in the array to 0... then at first [no accounts created therefore] slot is always 0 and array[slot].stud_num is also...
whenever i log in as admin... then logout...
it automatically logs in as student and shows the student menu....
i can figure out why... here's my main code... if you want to see the rest of the...
thanks dude... and sis...
sorry sis but i really dont know how [converting number to string]...
is it a function or is it? what? T.T
if "text version" of the strings is equal to the "number version" of an int...
like this...
char string[30] = "12345";
int number = 12345;
i want something that would tell that they are...
i tried ur code sir... but it wont display...
i know the values are there because i used my search function...
i think its the display section of the code which is under the bubble sort loops...
or is it possible?
thanks...
here's my code...
the colored portion is the bubble sort...
i just commented the bubble sort...
if i remove the bubble sort... it works fine, except for its order...
#include <stdio.h>...
ok sir thanks a lot...
ill do my coding now...
consultation time later... please?
thanks =)
here is my code and i have some questions....
1.) any suggestions how would i delete accounts in such a way that if i delete one, then that empty slot is immediately occupied by accounts on its...
thanks vart and Adak...
@creeping death, i use Turbo C30
i was actually finding a generator for designs like that [i.e. you enter characters and then converts it to big "word arts" using fellow...
actually in initialized every stud num to 0... to know if the account is empty...
for(i = 0; i < 20; i++)
{
array[i].stud_num = 0;
}
consultation time! =) please?
can u comment or suggest regarding this code?
i left the "delete_student" as comment because im unsure how to do it...
how would make it that when i delete an...
my problem is that whenever i write "quit" as username and also "quit" as password
[as what it requires to end the program in the login function] it exits normally, but when i run the program...
the thing is... i want to "redirect" the one colored in RED to the one colored in BLUE...
how? thanks!
P.S. Sorry for my noobish questions, its my first sem in C... srry
#include <stdio.h>...
what's the best arrangement when i intend to write my array of structs to a file?
my array of structs is like this....
typedef struct student_profile{
long long int stud_num;
char...
if i have a struct like this...
typedef struct student_profile{
long long int stud_num;
char name[50];
char bday[50];
char course[50];
} STUDENT;
btw, im abandoning this code...
i want to code another one but i wanna try first coding one not involving FILES...
maybe just add, delete, display students... to see whether my array of structs...
ahh i see sir... XD
lol....
but my code is not something like [read, manipulate, overwrite...] T.T thats why im doomed... i can even barely make the add_student work T.T
btw, here's my...