Search:

Type: Posts; User: Karpaty

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    1,263

    Thanx guys ;)

    Thanx guys ;)
  2. Replies
    3
    Views
    1,263

    Linked List question

    I have a question about linked lists. I have this code below, which Im trying
    to familirize myself with by carefully breaking down each statement...
    But im having trouble with one line (see...
  3. Replies
    16
    Views
    3,030

    Well, we've been told that for the exams we wont...

    Well, we've been told that for the exams we wont be allowed to use any library fuctions apart from those in stdio.h
  4. Replies
    16
    Views
    3,030

    A problem: if i change str2 to "s " (s followed...

    A problem: if i change str2 to "s " (s followed by a space character) I get a NOT FOUND outcome...
  5. Replies
    16
    Views
    3,030

    Ok, I've rewritten the program... Seems to be...

    Ok, I've rewritten the program... Seems to be working well... Although my function is much longer than 5 lines long... Is there an easier way of doing the same thing with less code?


    #include...
  6. Replies
    16
    Views
    3,030

    No, Im not allowed to use any string.h functions...

    No, Im not allowed to use any string.h functions


    Thats what Im actually trying to do with the code inside main(). Sure, its not a function, but the purpose remains the same...
  7. Replies
    16
    Views
    3,030

    String manipulation

    Hi, im trying to write a code to find whether one string is inside another string, without using the strstr() library. What I got so far is as follows:


    #include <stdio.h>
    int getlength(char[]);...
  8. Replies
    5
    Views
    2,332

    Ok, thank you... I got it working... :)

    Ok, thank you... I got it working... :)
  9. Replies
    5
    Views
    2,332

    Read and display data from files

    Hi, im stuck with this part of the program where I have to read all the data from a file (structure by structure) and display it in the list. The way I approched this is by first finding the total...
  10. Replies
    21
    Views
    3,745

    I finally got it working... It was quite simple...

    I finally got it working... It was quite simple actually...
    The way I got it to work is, as suggest by Elysia, by reading the previous data for the product into the structure and only then changing...
  11. Replies
    21
    Views
    3,745

    If this has been discussed before, can you please...

    If this has been discussed before, can you please point me to where I can read about it... I searched this forum for hours and couldnt find much help. perhaps i was searching for the wrong keywords?
  12. Replies
    21
    Views
    3,745

    Its Windows... thank you :)

    Its Windows... thank you :)
  13. Replies
    21
    Views
    3,745

    Im still unable to make this program work... ...

    Im still unable to make this program work...

    Ok, here's what I did:

    In the menu I gave the user a choice to add new product, modify the name of a specific product or exit. In the structure i...
  14. Replies
    21
    Views
    3,745

    Cheers... I've been struggling with this problem...

    Cheers... I've been struggling with this problem all weekend... Will now try and put the theory in practice ;)
  15. Replies
    21
    Views
    3,745

    Oh, thanks for clearing that up... btw, Elysia,...

    Oh, thanks for clearing that up...
    btw, Elysia, I have this function to add a new product:



    void add_product(product *p) {
    printf("Enter product description : ");
    gets(p->name);...
  16. Replies
    21
    Views
    3,745

    Sorry, i shoudl've been clearer... If I had...

    Sorry, i shoudl've been clearer... If I had written the structure into a file and then wanted to access only the price (to edit it for example)... Would I use something of this sort?
    ...
  17. Replies
    21
    Views
    3,745

    hehe, i just came here to ask absolutely the same...

    hehe, i just came here to ask absolutely the same question...
    I have a structure (a string of 50 bytes, a double of 4 bytes and an int of 4 bytes)...


    typedef struct product {
    char name[50];...
  18. Replies
    8
    Views
    1,198

    Doesnt "rb+" open the file for reading/writing?...

    Doesnt "rb+" open the file for reading/writing?
    I tried to change it to just "w" (to write into test2.txt), but it didnt work...
  19. Replies
    8
    Views
    1,198

    Ok, i rewritten the program with structures...

    Ok, i rewritten the program with structures (included changes you suggested, apart from fgets(). when i use it the code doesnt compile)... Here's the updated code:



    #include <stdio.h>

    struct...
  20. Replies
    8
    Views
    1,198

    Whats wrong with this program?

    Im writing a simple program that will ask user to enter his name and age,
    store it in a file and then display it from the file... Here's what i got so far....

    Edited: see code below....

    I dont...
  21. Replies
    5
    Views
    1,636

    Thanx. Will check it out ;)

    Thanx. Will check it out ;)
  22. Replies
    5
    Views
    1,636

    C Editor & Compiler all-in-one?

    Hi, sorry if this isnt related to any coding...
    Im just looking for a program (preferably a freeware) that would act as an editor and would also provide compile and run features. At the moment im...
  23. Replies
    23
    Views
    3,327

    Hehe, you noticed that didnt you? Yeah, we only...

    Hehe, you noticed that didnt you? Yeah, we only did gets() at this point, so I was quite reluctant to jump ahead of myself, even though everyone around said fgets() is better.
    Thank you as always......
  24. Replies
    23
    Views
    3,327

    Actually we did do the dynamic allocation of...

    Actually we did do the dynamic allocation of memory (malloc, calloc etc) last week, but we were told it was not essential for this particular assignment.
    Im gonna try to do it anyway, since it seems...
  25. Replies
    23
    Views
    3,327

    I think I can fix this problem by including...

    I think I can fix this problem by including the...


    getchar();

    ...line after the previous scanf() statement (see the edited code in the previous post)...



    Hmm, when you put it this way,...
Results 1 to 25 of 38
Page 1 of 2 1 2