Search:

Type: Posts; User: django

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds; generated 13 minute(s) ago.

  1. Replies
    7
    Views
    1,739

    I get it, I misred the strings part in your...

    I get it, I misred the strings part in your previous post. I know enough.
  2. Replies
    6
    Views
    1,180

    You are right. It is too early for me to know...

    You are right. It is too early for me to know even the simplests of things.
  3. Replies
    7
    Views
    1,739

    Ok, so you simply have to write your own...

    Ok, so you simply have to write your own functions to compare, add, subtract and multiply strings made up of integers?
  4. Replies
    6
    Views
    1,180

    I am by no means an experienced c programmer,...

    I am by no means an experienced c programmer, maybe a few lines ahead of you...but I have experienced that you get strange results when you tell printf to print a double which you do by '%d' while...
  5. Replies
    7
    Views
    1,739

    Hehe, thanks. I thought of it, instead of using...

    Hehe, thanks. I thought of it, instead of using floating point, I could simply use int + precision. Then you would somehow have to demand that all numbers are entered with the same precision and you...
  6. Replies
    7
    Views
    1,739

    fixed point arithmatic imp in c

    I need to compare some monetary values. Fixed point is not supported in C. I know there is enough material out there to spend a few PhD's on (including a special GNU library), but it will bog me...
  7. Replies
    6
    Views
    3,913

    I got it. It was a linking error. I was misled by...

    I got it. It was a linking error. I was misled by the fact that it never called something from the messaging.c file and therefore thought the linking was ok, which it was not. Thanks.
  8. Replies
    6
    Views
    3,913

    It was linking before. I have warnings to...

    It was linking before.
    I have warnings to maximum (on gcc -Wall).

    Come to think of it, everything that I used until now where structures that were in the messaging.h file, this is actually the...
  9. Replies
    6
    Views
    3,913

    undefined reference to (function)

    I just added a function (addToMsgQueue) to one of my sourcefiles (messaging.c) and to its header (messaging.h), compiled into a shared library, and now am trying to compile a third file -...
  10. Replies
    7
    Views
    1,645

    Thank you all, very helpful again. I know enough...

    Thank you all, very helpful again. I know enough to proceed.
  11. Replies
    7
    Views
    1,645

    Ok, makes sense. What grumpy suggests is quite...

    Ok, makes sense.

    What grumpy suggests is quite useful. I would also be interested in how you would approach polymorphism like designs in C.

    I just want to make sure: if you cast something from...
  12. Replies
    7
    Views
    1,645

    Depends. There are for example order messages...

    Depends. There are for example order messages which are all orders (like: I want to buy this and that) but who vary a little with respect to the member fields. They get processed in comparable ways....
  13. Replies
    7
    Views
    1,645

    casting from pointer to void

    I have a function that produces several messages which are implemented as different structs. The only thing the messages have in common is a member called 'type' to indicate which type of message it...
  14. Replies
    19
    Views
    1,973

    Thank you so kindly. I will try to keep it at the...

    Thank you so kindly. I will try to keep it at the garage and car level.

    Let me then ask you one more question about a specific car and a specific garage....

    Suppose I have a struct like this:
    ...
  15. Replies
    19
    Views
    1,973

    Funny as the garage story may be, it does not...

    Funny as the garage story may be, it does not help me a lot. I did allocate memory, and I currently I fail to see what is wrong there although I would be truly grateful if I was pointed to flaws in...
  16. Replies
    19
    Views
    1,973

    ........ yes I see it now,sorry. My Goodness,...

    ........ yes I see it now,sorry. My Goodness, this did it, it works. Men, so much trouble over one typo!
    I would still like to know if the thinking behind my malloc's (above) is seriously flawed....
  17. Replies
    19
    Views
    1,973

    struct keyValuePair { int key; char *value;...

    struct keyValuePair {
    int key;
    char *value;
    struct keyValuePair *next;
    };

    struct keyValuePair *parseMessageString(char *aMessageString) {

    //set walker to the first position of the first...
  18. Replies
    19
    Views
    1,973

    Ok, I see what you mean. But the '+1" was merely...

    Ok, I see what you mean. But the '+1" was merely intended as one extra byte for the '\0'. So I am only 1 off. (but Iguess this can be fatal). Anyway, I corrected it but it does not change anything.
  19. Replies
    19
    Views
    1,973

    Ok, makes sense. Let me briefly explain my...

    Ok, makes sense. Let me briefly explain my thinking behind every malloc and maybe you can correct any wrong thinking.


    char *key = malloc(MAXFIELD * sizeof(*key + 1)); /* char *key...
  20. Replies
    19
    Views
    1,973

    I put this line in for the following reason. At...

    I put this line in for the following reason.
    At first, I had value declared just as a char pointer. What then happened was,t hat the pointer firstPair, who is supposed to point at the first record,...
  21. Replies
    19
    Views
    1,973

    malloc does not seem to return

    I have a function that walks through a message string. The message string has a begin indicator, and an END indicator en a Separator to separate the key=value pairs in the string. It should return a...
  22. Replies
    4
    Views
    1,668

    I am running windows, should have said that.

    I am running windows, should have said that.
  23. Replies
    4
    Views
    1,668

    How does an executable find a shared library?

    I am making a c-program that uses shared libraries. Compilation is ok both of the executable and of the .so file. I run the file from my \bin directory, but I have compiled the .so file to the \lib...
  24. Replies
    14
    Views
    1,129

    Thanks professor (no pun intended). Such...

    Thanks professor (no pun intended). Such background info about how to think about what a header file is, is really helpful: all you need to know in order to be able to use a library. The definitions...
  25. Replies
    14
    Views
    1,129

    Yes we were, but it's clear now, I defined the...

    Yes we were, but it's clear now, I defined the structs in the header file. What I find strange however, is that I cannot do this in the original c-file. If I want to make the original c-file into a...
Results 1 to 25 of 99
Page 1 of 4 1 2 3 4