21.09.2013, 10:12
Hi guys! I know that this isn't C coding forums, but I've seen that there are few fluent C(++) programmers around here. I've only just finished K&R book, and my knowledge of C was more about finding vulnerabilities in code than building something working.
http://pastebin.com/vKetGzCk
I'd like you to tell me if I've commited any major mistakes, and how's my coding style. Additionally I have a question about unions. I thought that it simply pointed to one of specified variables, and that you didn't have to care later which one you are using, like in my code:
which would point at either PersonItem.name, or CompanyItem.name. How to achieve somthing similar?
http://pastebin.com/vKetGzCk
I'd like you to tell me if I've commited any major mistakes, and how's my coding style. Additionally I have a question about unions. I thought that it simply pointed to one of specified variables, and that you didn't have to care later which one you are using, like in my code:
Код:
//instead of singleItem.chosenItem.PersonItem.name //use singleItem.chosenItem.name