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.




Reply With Quote
Bookmarks