Valgrind Output

==21156== Invalid write of size 1
==21156==    at 0x4C2DDC0: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401BBC: Concat2() (string.cpp:31)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79c8a is 0 bytes after a block of size 10 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401B86: Concat2() (string.cpp:29)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid write of size 1
==21156==    at 0x4C2DDD3: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401BBC: Concat2() (string.cpp:31)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79c93 is 9 bytes after a block of size 10 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401B86: Concat2() (string.cpp:29)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid read of size 1
==21156==    at 0x4C2E0F4: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x4EFE999: std::basic_ostream >& std::operator<<  >(std::basic_ostream >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x401BD3: Concat2() (string.cpp:32)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79c8a is 0 bytes after a block of size 10 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401B86: Concat2() (string.cpp:29)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid read of size 16
==21156==    at 0x571A5B3: _IO_default_xsputn (genops.c:475)
==21156==    by 0x57185F1: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1353)
==21156==    by 0x570DD9C: fwrite (iofwrite.c:43)
==21156==    by 0x4EFE672: std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x4EFE9A7: std::basic_ostream >& std::operator<<  >(std::basic_ostream >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x401BD3: Concat2() (string.cpp:32)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79c80 is 0 bytes inside a block of size 10 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401B86: Concat2() (string.cpp:29)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid read of size 1
==21156==    at 0x571A5C2: _IO_default_xsputn (genops.c:475)
==21156==    by 0x57185F1: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1353)
==21156==    by 0x570DD9C: fwrite (iofwrite.c:43)
==21156==    by 0x4EFE672: std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x4EFE9A7: std::basic_ostream >& std::operator<<  >(std::basic_ostream >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x401BD3: Concat2() (string.cpp:32)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79c90 is 6 bytes after a block of size 10 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401B86: Concat2() (string.cpp:29)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid read of size 1
==21156==    at 0x571A5D2: _IO_default_xsputn (genops.c:475)
==21156==    by 0x57185F1: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1353)
==21156==    by 0x570DD9C: fwrite (iofwrite.c:43)
==21156==    by 0x4EFE672: std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x4EFE9A7: std::basic_ostream >& std::operator<<  >(std::basic_ostream >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x401BD3: Concat2() (string.cpp:32)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79c91 is 7 bytes after a block of size 10 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401B86: Concat2() (string.cpp:29)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid read of size 1
==21156==    at 0x571A5DF: _IO_default_xsputn (genops.c:475)
==21156==    by 0x57185F1: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1353)
==21156==    by 0x570DD9C: fwrite (iofwrite.c:43)
==21156==    by 0x4EFE672: std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x4EFE9A7: std::basic_ostream >& std::operator<<  >(std::basic_ostream >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x401BD3: Concat2() (string.cpp:32)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79c92 is 8 bytes after a block of size 10 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401B86: Concat2() (string.cpp:29)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid write of size 1
==21156==    at 0x4C2DDD3: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401C2B: Concat2() (string.cpp:36)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79ce4 is 0 bytes after a block of size 20 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401BF5: Concat2() (string.cpp:34)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid read of size 1
==21156==    at 0x4C2DDA4: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401C42: Concat2() (string.cpp:37)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79ce4 is 0 bytes after a block of size 20 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401BF5: Concat2() (string.cpp:34)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid write of size 1
==21156==    at 0x4C2DDC0: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401C42: Concat2() (string.cpp:37)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79ce4 is 0 bytes after a block of size 20 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401BF5: Concat2() (string.cpp:34)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid write of size 1
==21156==    at 0x4C2DDD3: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401C42: Concat2() (string.cpp:37)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79ce8 is 4 bytes after a block of size 20 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401BF5: Concat2() (string.cpp:34)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid read of size 1
==21156==    at 0x4C2E0F4: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x4EFE999: std::basic_ostream >& std::operator<<  >(std::basic_ostream >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x401C59: Concat2() (string.cpp:38)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79ce4 is 0 bytes after a block of size 20 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401BF5: Concat2() (string.cpp:34)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid read of size 8
==21156==    at 0x572BA83: __GI_mempcpy (memcpy.S:123)
==21156==    by 0x571855C: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1320)
==21156==    by 0x570DD9C: fwrite (iofwrite.c:43)
==21156==    by 0x4EFE672: std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x4EFE9A7: std::basic_ostream >& std::operator<<  >(std::basic_ostream >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x401C59: Concat2() (string.cpp:38)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79ce0 is 16 bytes inside a block of size 20 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401BF5: Concat2() (string.cpp:34)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid read of size 1
==21156==    at 0x4C2E1E4: strcpy (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401C9D: Concat2() (string.cpp:41)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79c8a is 0 bytes after a block of size 10 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401B86: Concat2() (string.cpp:29)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid write of size 1
==21156==    at 0x4C2DDC0: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401CBF: Concat2() (string.cpp:43)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79d4e is 0 bytes after a block of size 30 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401C7B: Concat2() (string.cpp:40)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid read of size 1
==21156==    at 0x4C2DDC4: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401CBF: Concat2() (string.cpp:43)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79ce4 is 0 bytes after a block of size 20 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401BF5: Concat2() (string.cpp:34)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid write of size 1
==21156==    at 0x4C2DDD3: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401CBF: Concat2() (string.cpp:43)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79d5c is 14 bytes after a block of size 30 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401C7B: Concat2() (string.cpp:40)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid read of size 1
==21156==    at 0x4C2E0F4: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x4EFE999: std::basic_ostream >& std::operator<<  >(std::basic_ostream >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x401CD6: Concat2() (string.cpp:44)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79d4e is 0 bytes after a block of size 30 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401C7B: Concat2() (string.cpp:40)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid read of size 8
==21156==    at 0x572BAED: __GI_mempcpy (memcpy.S:199)
==21156==    by 0x571855C: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1320)
==21156==    by 0x570DD9C: fwrite (iofwrite.c:43)
==21156==    by 0x4EFE672: std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x4EFE9A7: std::basic_ostream >& std::operator<<  >(std::basic_ostream >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x401CD6: Concat2() (string.cpp:44)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79d48 is 24 bytes inside a block of size 30 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401C7B: Concat2() (string.cpp:40)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid read of size 4
==21156==    at 0x572BA4E: __GI_mempcpy (memcpy.S:95)
==21156==    by 0x571855C: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1320)
==21156==    by 0x570DD9C: fwrite (iofwrite.c:43)
==21156==    by 0x4EFE672: std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x4EFE9A7: std::basic_ostream >& std::operator<<  >(std::basic_ostream >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x401CD6: Concat2() (string.cpp:44)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79d50 is 2 bytes after a block of size 30 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401C7B: Concat2() (string.cpp:40)
==21156==    by 0x402E33: main (string.cpp:181)
==21156== 
==21156== Invalid read of size 8
==21156==    at 0x572BA5F: __GI_mempcpy (memcpy.S:107)
==21156==    by 0x571855C: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1320)
==21156==    by 0x570DD9C: fwrite (iofwrite.c:43)
==21156==    by 0x4EFE672: std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x4EFE9A7: std::basic_ostream >& std::operator<<  >(std::basic_ostream >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==21156==    by 0x401CD6: Concat2() (string.cpp:44)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==  Address 0x5a79d54 is 6 bytes after a block of size 30 alloc'd
==21156==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21156==    by 0x401C7B: Concat2() (string.cpp:40)
==21156==    by 0x402E33: main (string.cpp:181)
==21156==