Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • 4
    I think you meant "int cols=2;" not "int cols;2;" - with the current code, cols is uninitialized. Commented Dec 31, 2013 at 6:25
  • I think test3 causes undefined behavior. Commented Dec 31, 2013 at 6:26
  • @CharlieTangora thank u for pointing it out. DOn't know why I didn't noticed it first.. Commented Dec 31, 2013 at 6:28
  • This code doesn't compile. Is a minimal complete example too much to ask? Commented Dec 31, 2013 at 6:29
  • 4
    Also, you should not use free use delete[] in this case Commented Dec 31, 2013 at 6:30