Do you mean
?Qt Code:
void q1(struct playerbase* pPlayerBase) { }To copy to clipboard, switch view to plain text mode
Do you mean
?Qt Code:
void q1(struct playerbase* pPlayerBase) { }To copy to clipboard, switch view to plain text mode
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
since op is using new, not free, I will assume this is C++ and not C: There is no need for struct keyword in signature.
Qt Code:
void func( ClassName* pClassName) { } void foo() { ClassName* ptr = new ClassName; func(ptr); }To copy to clipboard, switch view to plain text mode
Having said that, it is a very rare occurrence that anyone should be using new[] instead of e.g. QList or std::vector/queue.
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
Bookmarks