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

scandir clients directory
hi,
how can i scandir the clients directory? i need a script that when i click a button it will u

URL Rewrite issue
Im created a series of Rewrites and on page checks to make sure the correct url is being called. But

Calculus Help (and by help I mean homework)
Hrmmm, I hate posting about math homework, partly because it's homework, and partly because I hate w

XML Grouping
I'm using xml_parse_into_struct to get all my elements, but now I need to group them. For example, h

Progress bar for webpage
Hi,
I want to implement a progress/waiting bar on my webpage - exactly the same thing that the Mi

button help
i originally had this but realised it is much easier to have a button.

Code: <?php

A WBS element with the name XXX already exists in version FREI_VERSION
Hi.
When I am trying to insert WBS element in a project, error occurs:

"A WBS eleme

Select Rows as Columns..
is there a way to select COLUMN_NAME from user_tab_columns where table_name='TABLENAME';
and ha

CHECH A STRING FOR ' " ' (DOUBLE QUOTES)
I am checking for delimiter (.!?) and if there is a " after a sentence then it should neglect a

Insert data in Mysql and move to another page
I'm stuck with this simple problem. I need to insert data in Mysql and then hit submit and move to a

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