Just want to say thanks ahead of time first and foremost. I am trying to pass make[ctr] and model[ctr] by reference to my function to run a bubble sort and then call it back to main() to cout the result to the console screen. This is string data that i am passing by reference and I am stuck. What do I need to do? Thanks again.
Just something to point out: What is with line 37? Also, you don't appear to be using 'size1' and 'size2', maybe you should use them. Anyway, you are passing by reference: The only time you ever need to pass a pointer by reference is when you are changing the pointer itself, not the value pointed to (this goes for arrays, too: Arrays degenerate into pointers upon being passed to a function). Also, I'm pretty sure that you want #include <string> rather than #include <string.h> : The former is for the std::string class while the latter is for C-string helper functions (such as strcmp).