Hi! So in the main function, I want to call the void function Test(), but it seems like i"m unable to call it. Is there another way to do this and keep the function the same line. I know I can call it if I just end my cout statement and call it on the next line.
Made a few small changes to your program. Made the void functions into string functions, and passed the variables. Hope this is something you had in mind.
This is one way to do it. Note that the function returns a string, as opposed to nothing (void), so cout knows how to handle it and output the result of the function already. Also, outputting "" to cout does absolutely nothing for the record, so I removed those.
Edit: Haha, I got beaten to it this time. But oh well, both are similar ways of doing the same thing, so feel free to look at/use either or both.