Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Passing vectors as arguments (http://www.programmingforums.org/showthread.php?t=8882)

Soulstorm Mar 15th, 2006 11:32 AM

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?

Polyphemus_ Mar 15th, 2006 11:36 AM

Well... why don't you just do it :). I recommend using references, because that is a little faster.

Soulstorm Mar 15th, 2006 1:00 PM

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. :) :)

Ooble Mar 15th, 2006 1:16 PM

No reason for it to be deleted. Congrats on figuring it out.

Soulstorm Mar 15th, 2006 4:45 PM

Quote:

Congrats on figuring it out.
:) :) 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.... :)

Ooble Mar 18th, 2006 2:26 PM

If your brain's working right, what the hell are you doing coding? :p

Soulstorm Mar 18th, 2006 4:49 PM

:

If your brain's working right, what the hell are you doing coding?
Trying to prove otherwise. ;)


All times are GMT -5. The time now is 10:51 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC