![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 243
Rep Power: 3
![]() |
Passing vectors as arguments
Is there any way of passing vectors as arguments in a function? It can be done with strings. If it is possible, can it be done with pointers?
Or I am obliged to stick with passing each time the vector's contents?
__________________
Project::Soulstorm (personal homepage) |
|
|
|
|
|
#2 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
Well... why don't you just do it
. I recommend using references, because that is a little faster. |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 243
Rep Power: 3
![]() |
OMG OMG... Wrong typing. This post was made because I was trying to figure out what was wrong for 1 hour, and all the time I put 'vector a' instead of defining it's type. I am stupid and I hope this thread is deleted soon.
![]()
__________________
Project::Soulstorm (personal homepage) |
|
|
|
|
|
#4 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
No reason for it to be deleted. Congrats on figuring it out.
|
|
|
|
|
|
#5 | |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 243
Rep Power: 3
![]() |
Quote:
My stupidity knows no bounds. I have used vectors in many programs, but I guess not having your brain working right is part of the learning procedure at some point.... ![]()
__________________
Project::Soulstorm (personal homepage) |
|
|
|
|
|
|
#6 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
If your brain's working right, what the hell are you doing coding? :p
|
|
|
|
|
|
#7 |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 243
Rep Power: 3
![]() |
If your brain's working right, what the hell are you doing coding? ![]()
__________________
Project::Soulstorm (personal homepage) |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|