![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Expert Programmer
|
create a scientific calculater? all pointer based? with a nice GUI?
i believe that will put pointers to use, and also require some research on mathmatical forumals and maybe GUI? (just a suggestion)
__________________
"When in Rome, Do as the Romans Do" "Beauty is in the eye of the BEER holder" "Save your breath your going to need it for your blow up doll later" SearchLores.org |
|
|
|
|
|
#12 | |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
Quote:
cout << board[x][y]; Also, make sure you pass board in the following form: type **board; |
|
|
|
|
|
|
#13 |
|
Programming Guru
![]() ![]() |
Polyphemus_, But board is a pointer, and I thought to print the value of a pointer you go: cout << *pointer; Does this not apply to arrays?
EDIT: Wah, someone gave me negative karma on my first post... ![]() |
|
|
|
|
|
#14 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Read about pointers, what they are, and how they work. It isn't something you absorb by what you feel they ought to be. One way to look at them (generally frowned upon, but generally valid) is that they are indexes into the total array of memory addressable by your system. Obviously, one doesn't store data in an index; one stores data into the array element INDICATED by the index. A two dimensional array is just an array of arrays. You may address any element with the notation, Matrix [r][c]. You may also choose to address a row by its beginning position, and treat that BEGINNING position much like a pointer. It is, in fact, the address of an array. The address of an array is NOT precisely the same thing as a pointer, although there are operations (abetted by the compiler) in which they behave in much the same way. Again, you will find lots of inaccurate information relating to pointers. Read and think.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|