• 01-06-2003
_WaR_iS_pEaCe_
I just wanted to know what overloading, l value, and derefrence operator are because my teacher assigned me to understand these subjects. I tried to search the website for anything about these subjects but found nothing sorry if i missed a post that asked this question.
• 01-06-2003
Polymorphic OOP
Quote:

Originally posted by _WaR_iS_pEaCe_
I just wanted to know what overloading, l value, and defrence operator are because my teacher assigned me to understand these subjects. I tried to search the website for anything about these subjects but found nothing sorry if i missed a post taht asked this question.
Overloading is creating several different functions that share the same name but take different arguments.

An lvalue is a location value -- a place that you can not only get data from but also take the address of, write to, etc.

The dereference operator is the asterisk.
*
It's unary; you use it before a pointer to access the data being pointed to rather than the data's location in memory.
• 01-07-2003
Frobozz

You might wanna try Google.com next time:

http://www.cplusplus.com/doc/tutorial/tut4-2.html

There's one and here's the Google search I found it with:

• 01-14-2003
_WaR_iS_pEaCe_
thanks for the definitions
i have to talk about the dereference operator for about 1 minute tommorow in my class and all i have is your defenition can someone help me out? like maybe show me an example so i can make a poster of it.
• 01-14-2003
minesweeper
You fellas are in the same class aren't you?
• 01-14-2003
nextus
ok...
let see some code

Code:

``` int number = 5; int* pnumber = 0; // pnumber is a pointer to int & points to nothing pnumber = &number; // pnumber now contains the address of number *pnumber += 5; // i implicitly incremented number (5) by 5 now number contains 5 so... std::cout << *pnumber << " is equal to " << number << endl; std::cout << pnumber <<  " is equal to " << &number << endl;```
* can dereference a pointer and get the value the pointer is pointing to..

& is the address of operator and gives the address in memory of a variable (plus other things like references...but thats for another day :D )

also its get more complicated..but i thinks thats the basic....oh yea arrays and pointers are very similar....
• 01-14-2003
_WaR_iS_pEaCe_
Quote:

Originally posted by minesweeper
You fellas are in the same class aren't you?
yes we are in the same class thank you for telling me i didnt know he didnt tell me...