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

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Date help - fetch dates for Mondays between xxx and yyy?
Does anyone know the best way to do this? I have two dates, say:

2010-01-26 and 2010-05-30

Compare user input to flat file data
Help...Am a complete newbie to programming so my code is prolly quite long. Am trying to verify a us

Will an XHTML DOCTYPE interfere with my PHP if I'm not experienced enough?
I've read this article here: http://friendlybit.com/html/why-xhtml-is-a-bad-idea/

In a nutshe

A href problem under php
Hello...

I tried to explain the issue in an earlier post.. but was not clear enough....

Printer configuration
Hi All,
Suppose one of the user deleted the printer settings unfortunatly ,then what is the pro

Can't find the problem (no error message)!
OK, here's the deal. This code is really weirdly formatted (sorry!) and hard to understand, so I'm g

Images outside webroot
Im hopeing someone can help me with this because i cant figure it out.I have setup an ASP.NET websit

how do i make a string??
hey guys,
can someone please tell me how to put data from the glob function into a string

Php WordPress help
I am writing the following code for making a plugin

<?php
header("Content-Type

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