pointer 102 question


Posted on 16th Feb 2014 07:03 pm by admin

I read a book
1
2
3
4
5
6
7
8
9
10
11
12
int main() { int i; f(&i); cout << i; return 0; void f(int *j) { *j = 100; } }

I don't understand why f(&i) will work
&i is the address of i
should void f(int *j) change to void f(int &j)?
I understand I must be wrong, but what the meaning difference fot those two expressions??

No comments posted yet

Your Answer:

Login to answer
52 Like 35 Dislike
Previous forums Next forums
Other forums

selectbox+database connection retrive problem
Code: [Select]
<tr>
<th align="left" scope="c

unserialize help, getting errors
hi all ,
I got a form with 6 fields (2 input and 4 select box), when the page loads one block is

SAP Business Suite
Hi all:

Within the SAP Business Suite solution I would like to ask you the main differenc

C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.
What libr

max() problem
I have a while loop to get image names.
Code: $imagequery = mysql_query("SELECT * FROM ad_i

undefined offset help
Hi All,

I kept getting undefined offset PHP notice for a simple for loop. For eg
$va = arr

Combining Two Queries
I have two scripts that each work fine by themselves. One is a search script with a variable that de

change text color with a jQuery code
Hihow can I change the text in a asp:TextBox to a different color when I start typing using jQuery?I

IP Based Cron Jobs
I run cronjobs on my website. After one of my visitors got curious and tinkered around he realized h

BSP Ext - tableView - Sort - NEWBIE
Hi,
I have been trying to get the sort to work. I have defined the column definitions by fillin

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash