You may not like to use
std::
, but it'll save you some headaches eventually. I too was in the habit when I started, but I broke out of it. More information about its use here here.You really won't need
closingMessage()
, especially since it only outputs one message. It's an unneeded function-call, too.size
can just go insidegetFileName()
if there will be no other functions to use it. Better yet, just put that function in the same file asmain()
. This also applies tologFormatter
.I will have to agree with @Lstor on the commenting thing. Although there's nothing wrong with documenting your code, too much of it creates clutter. At this level, I would just comment like this:
Include a short explanation of the file at the top. This will remind you AND others what the following code is supposed to do.
If a line or block of code may look complicated to someone else, add a few notes about it. If you're just doing something common like file I/O, no need to comment that. YOU may not know how it works right away, but that's why you're learning through coding.
- Although @Lstor has mentioned
std::string
already, I cannot stress it enough. You're do a lot of deleting pointer-handling here. Don't be afraid to learn the STL; it's there to help you. Yes, you should learn about deleting and pointer-handling on your own, but that would be best for "learning" programs and not serious programs. You cannot let this get in the way of learning responsible coding, especially when other people read your code.
You may not like to use
std::
, but it'll save you some headaches eventually. I too was in the habit when I started, but I broke out of it. More information about its use here.You really won't need
closingMessage()
, especially since it only outputs one message. It's an unneeded function-call, too.size
can just go insidegetFileName()
if there will be no other functions to use it. Better yet, just put that function in the same file asmain()
. This also applies tologFormatter
.I will have to agree with @Lstor on the commenting thing. Although there's nothing wrong with documenting your code, too much of it creates clutter. At this level, I would just comment like this:
Include a short explanation of the file at the top. This will remind you AND others what the following code is supposed to do.
If a line or block of code may look complicated to someone else, add a few notes about it. If you're just doing something common like file I/O, no need to comment that. YOU may not know how it works right away, but that's why you're learning through coding.
- Although @Lstor has mentioned
std::string
already, I cannot stress it enough. You're do a lot of deleting pointer-handling here. Don't be afraid to learn the STL; it's there to help you. Yes, you should learn about deleting and pointer-handling on your own, but that would be best for "learning" programs and not serious programs. You cannot let this get in the way of learning responsible coding, especially when other people read your code.
You may not like to use
std::
, but it'll save you some headaches eventually. I too was in the habit when I started, but I broke out of it. More information about its use here.You really won't need
closingMessage()
, especially since it only outputs one message. It's an unneeded function-call, too.size
can just go insidegetFileName()
if there will be no other functions to use it. Better yet, just put that function in the same file asmain()
. This also applies tologFormatter
.I will have to agree with @Lstor on the commenting thing. Although there's nothing wrong with documenting your code, too much of it creates clutter. At this level, I would just comment like this:
Include a short explanation of the file at the top. This will remind you AND others what the following code is supposed to do.
If a line or block of code may look complicated to someone else, add a few notes about it. If you're just doing something common like file I/O, no need to comment that. YOU may not know how it works right away, but that's why you're learning through coding.
- Although @Lstor has mentioned
std::string
already, I cannot stress it enough. You're do a lot of deleting pointer-handling here. Don't be afraid to learn the STL; it's there to help you. Yes, you should learn about deleting and pointer-handling on your own, but that would be best for "learning" programs and not serious programs. You cannot let this get in the way of learning responsible coding, especially when other people read your code.
You may not like to use
std::
, but it'll save you some headaches eventually. I too was in the habit when I started, but I broke out of it. More information about its use here.You really won't need
closingMessage()
, especially since it only outputs one message. It's an unneeded function-call, too.size
can just go insidegetFileName()
if there will be no other functions to use it. Better yet, just put that function in the same file asmain()
. This also applies tologFormatter
.I will have to agree with @Lstor on the commenting thing. Although there's nothing wrong with documenting your code, too much of it creates clutter. At this level, I would just comment like this:
Include a short explanation of the file at the top. This will remind you AND others what the following code is supposed to do.
If a line or block of code may look complicated to someone else, add a few notes about it. If you're just doing something common like file I/O, no need to comment that. YOU may not know how it works right away, but that's why you're learning through coding.
- Although @Lstor has mentioned
std::string
already, I cannot stress it enough. You're do a lot of deleting pointer-handling here. Don't be afraid to learn the STL; it's there to help you. Yes, you should learn about deleting and pointer-handling on your own, but that would be best for "learning" programs and not serious programs. You cannot let this get in the way of learning responsible coding, especially when other people read your code.