seeplus:
Nice to hear from you again. You helped me out and gave me some confidence in my first post in this forum.
Well you wouldn't do it like this: |
Yeah, I was just using that layout/way for easy explanation purposes. I made some mistakes in this thread explaining myself. I was just looking for something easy to follow and with better detail.
that wouldn't be good coding. |
As I'm learning, it seems to me, that code I'm writing is not good coding. This C++ is not an easy task for me. I'm trying though, and won't give up! Thanks for popping in here. It is nice to hear from you again.
dhayden:
Thanks for the further explanation. It really helps. |
You can't imagine how relieved I am to hear that!! Sometimes I do have a hard time putting my thoughts into written words. I also thought that what I initially asked was a simple question. Believe me......I had NO IDEA what I was asking about!!! Thanks for your replies and help!!! Greatly appreciate it!!! On to the functions....
It's kind of ironic that the functions are the way to go for this. I have only written 1 successfully other than in my course material. The second function I tried, kept giving me errors about (a 2d vector) t5 is not declared in this scope. So, I'm currently reviewing the course section on functions. Its frustrating when you think you understand something, and try it on your own, just to find out, YOU HAVE NOT A CLUE WHAT YOU"RE DOING!! That has been almost everything I tried to do. Still, I'm not ready to throw in the towel!
The function examples that you posted look much better than the nesting loops I wrote. I will give that a try!! I do have 2 questions about it though.
#1 - On line 9 should that read void func ()? I see that on line #1 its void f () and (If I'm correct) it looks like the function on line1 calls the function on line 9. If that is not the case, can you educate me on what is happening there.
#2 -
I don't understand the return on the same line as the IF statement.