Search:

Type: Posts; User: hefese

Page 1 of 3 1 2 3

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    1,228

    You didn't understand me! Look at that: *...

    You didn't understand me! Look at that: * (&a[0][0] + i + j ) . I mean if we look the following statement,

    *(*(&a[0] + i ) + j)

    &a[0] returns address. &a[0] + i means address plus address....
  2. Replies
    4
    Views
    1,228

    What does *(&a[0][0] + i + j) mean?

    I noticed that *(&a[0][0] + i + j) and *(*(&a[0] + i) + j) are working samely. In my opinion, the second one is making sense. But, the first one? How it can be working and moreover can output same...
  3. Oppss.. Sorry, thank you for your answer.

    Oppss.. Sorry, thank you for your answer.
  4. Problem Of Pointer Representation In Two Dimensional Array

    Hi everybody,
    We know that arrays which has two dimensional are represented by two square brackets,[][]. (e.g. array[5][2]) But I noticed that this representation comes from pointer. I mean array...
  5. Okay, I understand. Thank you for answers.

    Okay, I understand. Thank you for answers.
  6. Member function is const...? I cannot understand....

    Member function is const...? I cannot understand. What is it? Did you mean that argument of the member function is constant. Or value which will be returned is const...?
  7. What does const means at the end of the function header?

    I usually see the term const at the end of the function header like that:



    bool Date::endOfMonth(int testDat) const
    {
    ...
    }

    I have searched this term which is related to function...
  8. Thank you for your answers.

    Thank you for your answers.
  9. Well, I understand. But how can you explain the...

    Well, I understand. But how can you explain the following codes?

    Code:1


    int *foo(int a,int b)
    {
    int x;

    x = a + b;
  10. 42 assigns to function's name foo. I guess I...

    42 assigns to function's name foo.
    I guess I understand.
  11. Local variable is popped from the stack, when the function is done, isn't it?

    As far as I know that local variables are popped from the stack when its scope is done. But in the following code, this information isn't provided. The code is running properly, although local...
  12. Okay, thanks for your reply.

    Okay, thanks for your reply.
  13. I understand now, thank you for responding.

    I understand now, thank you for responding.
  14. I don't understand this point: This access is...

    I don't understand this point: This access is done within a member function of object2, not member function of object1. Because of this my mind is confusing.

    After the process of...
  15. How could the object access its private data members from outside?

    Hi,
    I want to ask you that how does an object access its private data members in copy constructor.


    The relevant part of the code:

    C::C(const C &obj)
    {
    x = obj.x;
    y = obj.y;
  16. Replies
    2
    Views
    6,793

    Okay, I understand. Thank you for your answer.

    Okay, I understand. Thank you for your answer.
  17. Replies
    2
    Views
    6,793

    ++k and k++ are different processes, or not?

    I noticed a problem when I glanced at my studying document. The problem is about post and pre increment operator ++.

    Here are the code in mydocument:


    #include <iostream>
    #include <conio.h>
    ...
  18. Compiler doesnt give any error that I define a variable twice in C while cant do inC#

    Hi,
    I noticed that a something situtation about difference in C and C#. But I want to understand this difference, and I'm asking to you:

    In C;


    #include <stdio.h>
    #include <stdlib.h>...
  19. Meanwhile, I didn't write the diagram exactly...

    Meanwhile, I didn't write the diagram exactly correct. It should have been that;

    12020
  20. Yes, that's what I mean. OK, thank you so...

    Yes, that's what I mean.



    OK, thank you so much.




    void replace_CallByPointer(int *c,int *d)
  21. Yes, I saw the reason why I should use variable...

    Yes, I saw the reason why I should use variable temp, when I was going to your line you say. (std10093:I would suggest to initialize variable temp when declaring it)

    Thank you std10093 for your...
  22. When I try to ask you, I learn why I shouldn't...

    When I try to ask you, I learn why I shouldn't use pointer variable.

    As laserlight says, if I initialise pointer temp;



    void replace_CallByPointer(int *c,int *d)
    {
    int *temp=c; // temp...
  23. Why do I have to initialise temp? If I don't...

    Why do I have to initialise temp? If I don't remember as wrong, I use pointer variable in any program without initialising a lot of times before. Is there a situation about difference of C and C++ or...
  24. Why couldn't I swap the values of two variables with *temp?

    My teacher gave us a homework about exchanging the values of two variables with three different methods. These are callByValue, callByPointer and callByReference. I did all of them as you see the...
  25. Replies
    9
    Views
    2,667

    Yes, I have never heard it. Thank you so much for...

    Yes, I have never heard it. Thank you so much for the link.
Results 1 to 25 of 52
Page 1 of 3 1 2 3