Search:

Type: Posts; User: cdummie

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    464

    Well, i believe i should check if head is...

    Well, i believe i should check if head is pointing at something (because it doesn't then there's no list and rest of the code in function search makes no sense). Thanks for help, i really should...
  2. Replies
    3
    Views
    464

    Doubly linked list program problem.

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

    typedef struct item
    {
    int code;
    char name[21];
    double amount, price;
    }ITEM;
  3. Replies
    3
    Views
    499

    I think i see it now, it means it points at...

    I think i see it now, it means it points at nothing, the fact that the pointer is NODE only means it points to a variable whose type is NODE.
  4. Replies
    3
    Views
    499

    Problem with user defined type value?

    Say i have a structure like this:




    typedef struct node { int number;
    struct node *next;
    }NODE;

    int main ()
  5. Replies
    6
    Views
    524

    Well, i have to admit that you are absolutely...

    Well, i have to admit that you are absolutely right, but the problem is that i always first try to make my program work, and somehow i put aside things like making code readable and stuff. By the...
  6. Replies
    6
    Views
    524

    I did it with strstr but it makes no difference....

    I did it with strstr but it makes no difference. Program acts same way it did before.
  7. Replies
    6
    Views
    524

    Switching strings in file.

    I have to make a code that whenever it finds a string in a file that is same as the string which is given as the second command line argument it switches it with string that is third command line...
  8. Replies
    8
    Views
    650

    You are right, i will keep that in mind for the...

    You are right, i will keep that in mind for the next time. :biggrin:
  9. Replies
    8
    Views
    650

    It's first letter of the word that means length,...

    It's first letter of the word that means length, i guess i should use three letters just like i did for "cit".
  10. Replies
    8
    Views
    650

    Thanks a lot for helping me understand this, im ...

    Thanks a lot for helping me understand this, im not really familiar with pointers (especially with "double pointers"), basically i compared a value of s[i] with the memory location of command line...
  11. Replies
    8
    Views
    650

    Well, i didn't considered it as error since it...

    Well, i didn't considered it as error since it appears just as a warning, i saw it, but i couldn't figure out what's the problem since both s[i] and argv[2] are chars, i don't know how one of them...
  12. Replies
    8
    Views
    650

    Switching chars in file.

    I have to make a program that takes the file that is firs command line argument and whenever it finds a char in that file that is same as the second command line argument it switches it with char...
  13. Thread: Reading chars.

    by cdummie
    Replies
    8
    Views
    565

    It actually works when i add space before %c, it...

    It actually works when i add space before %c, it works even if i put %s instead of %c, but why do i have to add space before, is there something i don't know about it i mean why space before %c makes...
  14. Thread: Reading chars.

    by cdummie
    Replies
    8
    Views
    565

    It's not problem with the output, it asks me to...

    It's not problem with the output, it asks me to insert s[1]=s[2]= and the without asking for s[3]= (even though it prints it on the screen) it just prints whatever i inserted when it asked for...
  15. Thread: Reading chars.

    by cdummie
    Replies
    8
    Views
    565

    I've added & before s[i], and still, same thing...

    I've added & before s[i], and still, same thing happens.
  16. Thread: Reading chars.

    by cdummie
    Replies
    8
    Views
    565

    Reading chars.

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

    int main()
    {
    int n,i;
    char s[100];

    printf("n=");
    scanf("%d", &n);
  17. Replies
    3
    Views
    460

    fscanf function quiestion

    How fscanf function works, i mean does it read whole content of a file or it reads one string at the time.
  18. Replies
    3
    Views
    481

    I didn't noticed that, i guess i should check...

    I didn't noticed that, i guess i should check code better before posting again, anyway, thank you.
  19. Replies
    3
    Views
    481

    Why this code doesn't work?

    #include <stdio.h>
    #define MAX 100
    void formiraj (double [],double [], int, double (*p)(double));
    double razdvoji (double);

    int main()
    {
    double a[MAX], b[MAX];
    int n,i;
  20. Replies
    4
    Views
    498

    I'm not really familiar with using debugger, but...

    I'm not really familiar with using debugger, but thanks anyway.
  21. Replies
    4
    Views
    498

    I didn't wrote it myself, that's why i don't...

    I didn't wrote it myself, that's why i don't understand what's going on, i believe you are right about code being complicated, but still, i need to understand what is happening, then i'll be able to...
  22. Replies
    4
    Views
    498

    Creating dynamic string?

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

    char * form(char *format, ...);

    int main()
    {
    char *s;
  23. Replies
    2
    Views
    467

    Problem with understanding the code.

    #include<stdio.h>


    #include<stdlib.h>

    #include<string.h>

    #include<stdarg.h>

    char * konkatenacija(int n, ...);
  24. Replies
    2
    Views
    370

    Thanks, that really helped me.

    Thanks, that really helped me.
  25. Replies
    2
    Views
    370

    Freeing dynamic allocated memory?

    What would happen if, for some reason, i must free the string that is not allocated, but it has a value 0, like char *string1 = 0, can i use free(string1)? And why?
Results 1 to 25 of 45
Page 1 of 2 1 2