S
spasmous2
I have some working C++ code that (stripping out extraneous code) does
the following:
int main(int argc, char *argv[])
{
DcmFileFormat dcm[argc];
....
}
The code compiles without complaint with -Wall on and appears to
execute fine with different argc values. However coming from a C
background, I'm wondering if this is valid C++ and whether the memory
needs to be "freed" at the end? I vaguely recall new and delete
operators in C++ but don't know if they're relevant in this case.
I apologize for my naive question. I hope someone can help - thanks!
the following:
int main(int argc, char *argv[])
{
DcmFileFormat dcm[argc];
....
}
The code compiles without complaint with -Wall on and appears to
execute fine with different argc values. However coming from a C
background, I'm wondering if this is valid C++ and whether the memory
needs to be "freed" at the end? I vaguely recall new and delete
operators in C++ but don't know if they're relevant in this case.
I apologize for my naive question. I hope someone can help - thanks!