Search:

Type: Posts; User: marcoesteves

Search: Search took 0.01 seconds.

  1. Replies
    11
    Views
    12,084

    Doesn't work :( If write a bigger string then...

    Doesn't work :( If write a bigger string then STR_SERIAL, program don't stop


    case 1:
    printf("Create a new component\n");
    do {
    printf("Serial number?\n");
    ...
  2. Replies
    11
    Views
    12,084

    Or I don't understand or something is missing. I...

    Or I don't understand or something is missing.
    I change my code to this,

    printf("Create a new component\n");
    do {
    printf("Serial number?\n");

    fgets(c_description, STR_SERIAL,...
  3. Replies
    11
    Views
    12,084

    Ok. I'll try a mix of the advices to get a nice...

    Ok. I'll try a mix of the advices to get a nice solution.

    My program is full funtional. But the "basic things" don't work. This is make me mad :D
  4. Replies
    11
    Views
    12,084

    So, remove all fflush. Create a dump_line...

    So, remove all fflush.
    Create a dump_line function and call it after fgets?
  5. Replies
    11
    Views
    12,084

    Thanks for the tips. Just to make clear. ...

    Thanks for the tips.

    Just to make clear.

    Your advice is use fgets to get strings and sscanf to get the float value of price?
  6. Replies
    11
    Views
    12,084

    problems with fgets

    Hello people.
    I'm getting problems with fgets.

    while (run) {
    printMenu();
    scanf("%d*c", &opt);

    switch (opt) {
    case 1:
    printf("Create a new component\n");
Results 1 to 6 of 6