Search:

Type: Posts; User: Giwrgows x

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Can't we pass the item directly to structB?...

    Can't we pass the item directly to structB? because i did it with a char array before but the task is to do it without accessory variables/arrays
  2. Pop(&StackA,StackB->Element[0]); //gets error...

    Pop(&StackA,StackB->Element[0]); //gets error
    What i meant by that is that it shows error about the -> symbol, which doesn't allow me to access the adress of stackB.Element[0] so i can pop the L...
  3. typedef struct{ int Top; ...

    typedef struct{
    int Top;
    StackElementType Element[StackLimit];
    } StackType;

    int main(){
    StackType StackA;
    StackType StackB;
    int i;
    CreateStack(&StackA);
  4. Can't address the adress of struct array

    Well, i have to make a stack with some letters and reverse it by using 2 more stacks. My problem is that when i try to pop a letter from first stack to stack 2, it doesn't really works since first...
  5. Replies
    16
    Views
    979

    i had tried this if (gender == 'A')...

    i had tried this

    if (gender == 'A')
    *males++;
    else
    *females++;

    but i got warnings
    They are pointers given to the function i had posted yesterday
  6. Replies
    16
    Views
    979

    thanks everyone, fixed them. Can anyone explain...

    thanks everyone, fixed them. Can anyone explain me why my counters don't increase?



    //.. previous program lines
    if (gender == 'A')
    males++;
    else
    ...
  7. Replies
    16
    Views
    979

    @matticus the problem was because of the digits...

    @matticus the problem was because of the digits of grades
    fix my code,yet can't copy gender to the struct's sex member

    void read_inputs(studentsT array[],int size,FILE* fp){
    int nscan,i;
    ...
  8. Replies
    16
    Views
    979

    Input : KWSTAS, PAPANIKOLAOU, 19.7, 16.9, 17.8,...

    Input :
    KWSTAS, PAPANIKOLAOU, 19.7, 16.9, 17.8, 18.0, 19.5, 20.0, A
    MICHALIS, ANTONIOU, 4.1, 8.2, 10.0, 5.5, 11.7, 6.4, A
    RALLIA, CHRISTIDOU, 15.7, 16.4, 16.8, 19.2, 13.0, 18.8, G
    PEGGY, ZINA,...
  9. Replies
    16
    Views
    979

    i have fixed it, but while im printing what i...

    i have fixed it, but while im printing what i scan, gender is printed below the normal line
  10. Replies
    16
    Views
    979

    that print i'm trying to do is just for checking...

    that print i'm trying to do is just for checking purposes at the moment
    i have tried to do that with nscan but i get always error, so i have better to be able to read normally the lines, then i add...
  11. Replies
    16
    Views
    979

    can't read with %lf

    void read_inputs(studentsT array[],int size,FILE* fp){
    int nscan;
    double grades[6];
    char name[15],surname[25],gender,termch;
    while(true){
    nscan = fscanf(fp,"15[^,],...
  12. if i remove this : if (nscan != 5 || termch...

    if i remove this :

    if (nscan != 5 || termch != '\n'){ Error("Improper file format");
    }

    It works fine, and I can continue to next steps of my exercise, but I need a warning...
  13. wrong result,while debugger shows it right

    i had made a thread yesterday where i had problems with passing values to a struct. Now, i fixed that but, i can't open the files.(i have started programming on linux)

    Here is the code

    void...
  14. My fault guys sorry, since i have some headaches....

    My fault guys sorry, since i have some headaches. I fixed it myself when i noticed it and thanks very much. What my problem is now is that is says that %d argument 4(and 6) expects type of int * but...
  15. Replies
    6
    Views
    1,061

    typedef struct{ int a; }test_struct; int...

    typedef struct{
    int a;
    }test_struct;

    int main(){
    test_struct.a = *value;
    return 0;

    is this what do you need?
  16. troubles reading information from a file to a struct

    #include <stdio.h>
    #include "string.h"
    #include "simpio.h"

    #define M 100

    typedef struct{
    char epwnymo[30];
    int ypolipo;
    double epitokio;
  17. Since you are using 2d array a practical use...

    Since you are using 2d array a practical use could be the prototype C99. What you are doing is just passing 16 while it's useless since you need 4 for i and 4 for j.

    void read(int size1,int...
  18. Replies
    2
    Views
    438

    int *b[] //you are making a pointer to the first...

    int *b[] //you are making a pointer to the first index of the array while array it's already a pointer
  19. are you talking about some kind of this: if...

    are you talking about some kind of this:

    if (ch == ' ')
    putchar('\n')

    how can i check for double characters since im getting 1 everytime with fgetc
  20. Reading from a file and print in a different line

    So, this time I'm trying to read a text from a file, and print each word in a different line. Since I'm using my linux laptop atm and my debugger doesn't work, i have some troubles to see what's...
  21. Replies
    9
    Views
    926

    fixed it, yet my problem i mentioned in post #6...

    fixed it, yet my problem i mentioned in post #6 is still there
  22. Replies
    9
    Views
    926

    #include #include "string.h" #include...

    #include <stdio.h>#include "string.h"
    #include "simpio.h"


    #define M 20


    void read_input(FILE* inputfile,char array[]);
    void remove_spaces(char array_w_b[],char array_wo_b[]);
    void...
  23. Replies
    9
    Views
    926

    managed to fix that issue. now my problem is...

    managed to fix that issue.
    now my problem is that it displays error while it shouldn't since the value of nscan is 2
  24. Replies
    9
    Views
    926

    I tried this: #include #include...

    I tried this:

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


    void remove_spaces(char array_w_b[],char array_wo_b[]);


    int main(void) {
    char input[] = "This is a test string.";
  25. Replies
    9
    Views
    926

    so, my problem is how i do remove spaces and not...

    so, my problem is how i do remove spaces and not this?

    void read_input(FILE* inputfile,char array[]){ int nscan;
    char termch;
    while(TRUE)
    {
    nscan =...
Results 1 to 25 of 48
Page 1 of 2 1 2