Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (1 invisible), 857 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
vector #353655
01/12/11 02:31
01/12/11 02:31
Joined: Dec 2010
Posts: 31
C
chit Offline OP
Newbie
chit  Offline OP
Newbie
C

Joined: Dec 2010
Posts: 31
i just want to ask if it is possible to create a array of VECTOR?
i'm just newbie

Re: vector [Re: chit] #353658
01/12/11 03:24
01/12/11 03:24
Joined: Jan 2011
Posts: 120
United States
Logan Offline
Member
Logan  Offline
Member

Joined: Jan 2011
Posts: 120
United States
Code:
VECTOR* vector_array[100];



Yessir.

Re: vector [Re: Logan] #353659
01/12/11 03:31
01/12/11 03:31
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Or
Code:
VECTOR vector_array[100];

...if you want an array of VECTOR and not VECTOR pointers.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: vector [Re: JibbSmart] #353684
01/12/11 09:28
01/12/11 09:28
Joined: Dec 2010
Posts: 31
C
chit Offline OP
Newbie
chit  Offline OP
Newbie
C

Joined: Dec 2010
Posts: 31
thanks a lot my friend it help's a lot for me

Re: vector [Re: chit] #353685
01/12/11 09:30
01/12/11 09:30
Joined: Dec 2010
Posts: 31
C
chit Offline OP
Newbie
chit  Offline OP
Newbie
C

Joined: Dec 2010
Posts: 31
my friend i just want to ask again if it is possible in two dimensional array

Re: vector [Re: chit] #353686
01/12/11 09:36
01/12/11 09:36
Joined: Jan 2011
Posts: 120
United States
Logan Offline
Member
Logan  Offline
Member

Joined: Jan 2011
Posts: 120
United States
Best way to find out is to declare a two dimensional VECTOR array in SED and hit Run. If you get an error, it's not possible. If you don't, it is possible. tongue

Experimentation is the best way to learn programming if you ask me. Don't be afraid of the compiler yelling at you, it doesn't care. If you WISH something worked, try it, and worst case you'll know it doesn't if you get a compiler error. Best case, you just solved your own problem.

Re: vector [Re: Logan] #353729
01/12/11 16:18
01/12/11 16:18
Joined: Feb 2006
Posts: 52
C
carlpa Offline
Junior Member
carlpa  Offline
Junior Member
C

Joined: Feb 2006
Posts: 52
I have recieved a curious system crash defining VECTOR* any_name[15] then trying to use any_name[i].x or ".y". I think one has to formally refer to the VECTOR pointer. Would (any_name)[i].x or &any_name[i].x work? Just curious as to how and requesting education.


Researcher & clinician. A6, A7, & A8
First computer a Commodore Pet
Re: vector [Re: carlpa] #353730
01/12/11 16:19
01/12/11 16:19
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Just try without the star * else you have just a pointer to a vector, but no actual vector wink

Re: vector [Re: Rei_Ayanami] #353731
01/12/11 16:24
01/12/11 16:24
Joined: Feb 2006
Posts: 52
C
carlpa Offline
Junior Member
carlpa  Offline
Junior Member
C

Joined: Feb 2006
Posts: 52
I thought that may be the best answer. Please correct me if the following is wrong:

VECTOR any_name[15];
then refer to the pointer with &any_name[i]

A silly thing I should know pat but I just followed examples. Thank you.


Researcher & clinician. A6, A7, & A8
First computer a Commodore Pet
Re: vector [Re: Rei_Ayanami] #353732
01/12/11 16:25
01/12/11 16:25
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
if a is a structure type use a.b to get the member b of a. If it's a pointer type you can use a->b or (*a).b.

Last edited by DJBMASTER; 01/12/11 16:26.
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1