Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Vectors and Structs

Author
Message
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 16th Jul 2010 13:33 Edited at: 16th Jul 2010 13:33
Hey,

I have began to understand a very tiny bit about vectors.

But i got the folowing error:



With this code:



Note: The actual code is longer, but this is the interesting part.

Ideas?

Thanks,

Red Eye

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 16th Jul 2010 15:48
You don't need a $ for strings, you don't need # for floats.

"everyone forgets a semi-colon sometimes." - Phaelax
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 16th Jul 2010 17:28
Yeah, C++ names can only include alpha-numeric characters and underscore. They cannot start with a numeric character either.

[b]
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 16th Jul 2010 18:33 Edited at: 16th Jul 2010 18:37
O i though it would handier for me, to do that (i know it is only in basic) But thanks!

But it aint working either.

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 17th Jul 2010 02:25
Also you are declaring an array of vectors for some reason. You want just a vector not an array of vectors:


If you want to give it 100 elements then use:


Also you cannot have code in the global scope, all code must be inside functions.

[b]
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 17th Jul 2010 10:06
Okay! I understand thanks mates, u helped me out.

Login to post a reply

Server time is: 2024-11-19 20:47:11
Your offset time is: 2024-11-19 20:47:11