|
-
Aug 23rd, 2001, 03:47 PM
#1
Thread Starter
Addicted Member
vector issues....
hello!
Anybody knows exactly why a 2-dimensional vector have to be used as a pointer to that one when you declare it and later on, you just can use it like a normal vector......any ideas?
example:
char *months[3][12] =
{
{bla............blah..........},
{bla............blah..........},
{bla............blah..........},
};
.
.
.
cout << months[3][1];
/praetorian
-
Aug 23rd, 2001, 04:09 PM
#2
transcendental analytic
2 dimensional vectors are called matrices
the array data is not stored with the dimension so it could be interpreted in much any way, the compiler is only keeping track of the array dimensions for you to use it as a matrix, otherways as it is stored consequentially the char array is written until next null, no matter what dimensions you have
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 23rd, 2001, 05:03 PM
#3
Thread Starter
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|