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

phpmailer class & pop.gmail.com?
Code: <?php
$mail->IsSMTP();
$mail->Host = "pop.gmail.com";

problem with refreshing
in my site, i have an index page, it has a main div. this main div's content is changing according t

Unique Visitor Tracking
Hello. Currently, I run a voting site where voters are tracked by their IP address and can only vote

Checking if field is empty AND using !is_numeric
Hi lads,

Need to be able to display an error message (using isset?) that says "Cant lea

Cannot Connect to Database
I am writing an application to do annual reviews. I cannot get my script to work. Whenever it runs I

How to make a input/output field with multiple lines
Hello.
I put a input/output field on the screen but I could not change height of it. I need to

disabling a button server-side then re-enabling client-side breaks button postback
I have a tabbed container and a button (not in the container) on a page. If the first tab is selecte

urldecode question
How would I format this line of code properly?

<?php echo urldecode($_GET['Title']); ?

Auto install
Hi I have a directory lets say "apps" that I then have more folders ie "email",

Simple MySQL script is not working
Hey guys,

Just familiarizing myself with PHP and MySQL. I am following along in the O'Reilly

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