I confirmed a hunch I had...
"Is that return statement necessary? What if the function was type void and I just did the operation? Further investigation is needed. I'm not sure why I even made it like that now..."
I changed my function to type void, returned nothing, and then just ran the function in main (without equating it to anything since it doesn't return anything). Since I passed it the memory address of my variable in main() it still worked.
Per my last post I think what I'm doing is a no-no, but meh for now.
No comments:
Post a Comment