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....
Type: Posts; User: hefese
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....
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...
Oppss.. Sorry, thank you for your answer.
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...
Okay, I understand. Thank you for answers.
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...?
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...
Thank you for your answers.
Well, I understand. But how can you explain the following codes?
Code:1
int *foo(int a,int b)
{
int x;
x = a + b;
42 assigns to function's name foo.
I guess I understand.
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...
Okay, thanks for your reply.
I understand now, thank you for responding.
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...
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;
Okay, I understand. Thank you for your answer.
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>
...
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>...
Meanwhile, I didn't write the diagram exactly correct. It should have been that;
12020
Yes, that's what I mean.
OK, thank you so much.
void replace_CallByPointer(int *c,int *d)
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...
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...
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...
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...
Yes, I have never heard it. Thank you so much for the link.