Search:

Type: Posts; User: kkkcj

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Severity ...

    Severity Code Description Project File Line Suppression StateError C2059 syntax error: '==' Project25 c:\users\yi cian\documents\visual studio...
  2. and i should put the findStaffbyid in the...

    and i should put the findStaffbyid in the beginning of the modify code or last?
  3. after that it show red underline on == say...

    after that it show red underline on == say excepted a field name sry for all the question...i really not good at programming
  4. ohhh...i see and for staff...

    ohhh...i see and for

    staff *findStaffById(staff *staffObj, int id) {
    int found = 0;
    FILE *fp = fopen("staff.dat", "rb");
    if (!fp) {
    return NULL;
    }

    while...
  5. which mean i should not use staff P[20]; right?

    which mean i should not use staff P[20]; right?
  6. i got it..i intent to to keep reading the file...

    i got it..i intent to to keep reading the file whenever you want to access the data
    and


    void modifyStaff() {
    char ans, cont, name[25], position[20];
    int i = 0, pCount, modiCount = 0,...
  7. alarm the user when the id already exist in staff system using c programming

    void addStaff()
    {


    struct staff staa;
    char ans;
    FILE *fp;


    fp = fopen("staff.dat", "ab");
  8. Replies
    18
    Views
    6,085

    but i'm declare the salary as the integer type...

    but i'm declare the salary as the integer type ...i'm not sure which part you refer to and after i change the code become (id == P[i].id ) the compiler will straight print no record founded with this...
  9. Replies
    18
    Views
    6,085

    if(id == P[i].id ==0){ found =1;...

    if(id == P[i].id ==0){
    found =1;
    this is mean if the id user enter same as id store in system. print all the details and another question is the compiler will display the details even...
  10. Replies
    18
    Views
    6,085

    typedef struct staff { int id, salary; char...

    typedef struct staff {

    int id, salary;
    char name[30], position[30];
    }staff;

    void modifyStaff() {
    char ans, cont, name[25], position[20];
    int i = 0, pCount, modiCount = 0, found, id[20];...
  11. Replies
    18
    Views
    6,085

    void modifyStaff() { char ans, cont, name[25],...

    void modifyStaff() {
    char ans, cont, name[25], position[20];
    int i = 0, pCount, modiCount = 0, found, id[20];
    int salary[20];
    staff P[20];
    FILE*fp;
    fp = fopen("staff.dat", "rb");
    while...
  12. Replies
    18
    Views
    6,085

    i misunderstand it...i get it now...is the...

    i misunderstand it...i get it now...is the salary...
  13. Replies
    18
    Views
    6,085

    which mean i should use =?

    which mean i should use =?
  14. Replies
    18
    Views
    6,085

    and it will not change the original data..for...

    and it will not change the original data..for example i modify the name kkk to become yyy, it still show the kkk instead of yyy
  15. Replies
    18
    Views
    6,085

    void modifyStaff() { char ans, cont, name[25],...

    void modifyStaff() {
    char ans, cont, name[25], position[20];
    int i = 0, pCount, modiCount = 0, found, id[20];
    int salary[20];
    staff P[20];
    FILE*fp;
    fp = fopen("staff.dat", "rb");
    while...
  16. Replies
    18
    Views
    6,085

    thank u very muchhh....there another question..it...

    thank u very muchhh....there another question..it will only execute until the line 21...it wont execute the remain row
  17. Replies
    18
    Views
    6,085

    typedef struct staff { int id,salary; char...

    typedef struct staff {

    int id,salary;
    char name[30], position[30];


    }staff;
  18. Replies
    18
    Views
    6,085

    error about strcpy and strcmp

    void modifyStaff() {
    char ans, cont, staid[20], name[25], position[20];
    int i = 0, pCount, modiCount = 0,salary,found;
    staff P[20];
    FILE*fp;
    fp = fopen("staff.dat", "rb");
    ...
  19. Replies
    22
    Views
    13,548

    int main(void) { int flag = login(); if...

    int main(void)
    {
    int flag = login();


    if (flag == LOGIN_SUCCESSFUL)
    menu();
    else
    printf("flag %d\n\n", flag);
  20. Replies
    22
    Views
    13,548

    enum { LOGIN_SUCCESSFUL = 0,...

    enum
    {
    LOGIN_SUCCESSFUL = 0,
    LOGIN_FAILURE_WRONG_PASSWORD = -23,
    LOGIN_FAILURE_NO_SUCH_USER = -44
    };


    int login()
    {
  21. Replies
    22
    Views
    13,548

    #include #include #include...

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    int login()
    {
    char username[15];
    char password[12];

    printf("Enter your username:\n");
  22. Replies
    22
    Views
    13,548

    i try..but if user name and password both correct...

    i try..but if user name and password both correct it only show the Welcome.Login Success and won't show the menu
  23. Replies
    22
    Views
    13,548

    and make the password display as ***

    and make the password display as ***
  24. Replies
    22
    Views
    13,548

    add the log in function in main

    login()
    {
    char username[15];
    char password[12];




    printf("Enter your username:\n");
    scanf("%s", &username);
  25. Replies
    18
    Views
    4,572

    no..i'm using %s

    no..i'm using %s
Results 1 to 25 of 49
Page 1 of 2 1 2