Search:

Type: Posts; User: dariyoosh

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thanks for pointing this out.

    Thanks for pointing this out.
  2. I see now my mistake, thanks for the explanation.

    I see now my mistake, thanks for the explanation.
  3. According to man 3 scanf, I don't think that 4 is...

    According to man 3 scanf, I don't think that 4 is the right value but rather 5


    And here is the output of the example I provided:



    $ gcc -Wall testprog.c -o testprog
    $ ./testprog...
  4. Hi, Based on the line 7, of your example ...

    Hi,

    Based on the line 7, of your example


    char s[20];

    The max length is known.

    Also I don't understand the use of atoi in your code. You find the length of the string by using strlen...
  5. A question about freeing the allocated space of linked list

    Hello,


    Environement description:


    OS: Linux Ubuntu x86_64
    glibc: (Ubuntu EGLIBC 2.19-0ubuntu6.6)
  6. Replies
    6
    Views
    969

    Maybe I don't read it correctly, but what I see...

    Maybe I don't read it correctly, but what I see is that currently your llDelete function is empty.
  7. As Adak said, you need a pointer as the function...

    As Adak said, you need a pointer as the function argument. A pass by value doesn't do the job.

    An example:



    #include <stdio.h>

    void delContactByValue(int param_addressCounter)
    {
  8. And how much you have already done, so far, in...

    And how much you have already done, so far, in terms of writing code for this problem?
  9. Hello there, If you use a void function,...

    Hello there,


    If you use a void function, then you will need a pointer of pointer to your struct.

    you can try the following:



    #include <stdio.h>
  10. Replies
    14
    Views
    1,374

    @whiteflags Many thanks for this...

    @whiteflags

    Many thanks for this clarification.

    Regards,
    Dariyoosh
  11. Replies
    14
    Views
    1,374

    That is very sad. An address is the...

    That is very sad.


    An address is the content/value of a pointer. Saying an address is/is not equivalent with a pointer has no meaning.


    There are for sure double pointers. Each row is an...
  12. Replies
    14
    Views
    1,374

    I'm not sure whether I understood your point :) ...

    I'm not sure whether I understood your point :)

    An array, let's an int array, is a pointer to its first cell. Therefore it includes the address of its first cell, and that's why the sizeof...
  13. Replies
    14
    Views
    1,374

    In addition, what sizeof returns depends on the...

    In addition, what sizeof returns depends on the platform and also glibc installed on the system (processor X86 or x86_64). Here is what I get when I run the following on a Linux system (Fedora Core...
  14. Hello there, What I understand from your...

    Hello there,

    What I understand from your problem (well, actually you may need to modify a bit my solution for the value range part inside a loop) is that:

    Assuming that numberOfRows is the...
  15. Replies
    5
    Views
    1,022

    I have never seen an assignment like this ...

    I have never seen an assignment like this


    tempStorage -> productName[50] = tempProductName[50]; //this part

    Are you sure that you compile this without any error? (Linux or Windows?)
  16. Replies
    5
    Views
    1,022

    Hi, Looking at your code, what I understand is...

    Hi,

    Looking at your code, what I understand is that at the line n° 155 you test equality based on address of pointers and not their pointed values



    if (displayItem -> categoryName ==...
  17. Replies
    4
    Views
    974

    And here is a second version as a void function...

    And here is a second version as a void function which takes as parameter a pointer of pointer



    /*
    * Deletes the element at the given position.
    */
    void deleteAtPosition(item_t **items, int...
  18. Replies
    4
    Views
    974

    Hello there, You can try the following...

    Hello there,


    You can try the following (assuming that list element indexes start at 0)



    #include <stdio.h>

    /*
  19. Replies
    10
    Views
    1,939

    What is exactly the error message you get when...

    What is exactly the error message you get when compiler halts upon the third function (therefore powerArgs I guess)?

    Also doing casting to double while calling the pow function (in powerArgs)...
  20. Then the lines 11 and 12 in your code should be...

    Then the lines 11 and 12 in your code should be moved inside the loop (assuming that you wish to read at most 25 times temperature from the kyboard, yet if I were you I would use a infinite loop...
  21. Replies
    3
    Views
    3,578

    There could be actually many possibilities,...

    There could be actually many possibilities, particularly as it was said, if you decide to implement your own key generator. As an example (among many other possibilities) you can use Java...
  22. Replies
    4
    Views
    8,705

    I think you may want to change the way you search...

    I think you may want to change the way you search for the specific number in your string value, at the lines 24, 25 in your code


    if (array[i] == number)
    number_count++;

    allows to...
  23. Replies
    5
    Views
    1,245

    And based on what has been given to you, what...

    And based on what has been given to you, what have you implemented so far?

    Regards,
    Dariyoosh
  24. Replies
    5
    Views
    1,245

    Hi, Your code would be something similar to...

    Hi,

    Your code would be something similar to this



    #include <stdio.h>

    int main()
    {
  25. Replies
    18
    Views
    10,843

    Yes, thanks for the remark, here is the corrected...

    Yes, thanks for the remark, here is the corrected version. Now that I look to the picture he provided, as I understand, only height = 0 is ignored but not height = 1. Also for each height H and line...
Results 1 to 25 of 38
Page 1 of 2 1 2