using namespace std
in an implementation file is not a big deal, though I tend to think of that as sign of laziness, since typing std::
is not going to cost you that much. We are not talking about a_very_long_namespace_name
. But this is an open-ended discussion discussion anyway.
using namespace std
in an implementation file is not a big deal, though I tend to think of that as sign of laziness, since typing std::
is not going to cost you that much. We are not talking about a_very_long_namespace_name
. But this is an open-ended discussion anyway.
using namespace std
in an implementation file is not a big deal, though I tend to think of that as sign of laziness, since typing std::
is not going to cost you that much. We are not talking about a_very_long_namespace_name
. But this is an open-ended discussion anyway.
YouYour code is filled with magic numbers. Taking the constructor of PEND
, for instance, there are five or six different constants used, none of these are explained with comments. Try to turn them into named constants, or at least comment why you've chosen the given values.
The spacing gives more emphasis and visibility to the operators.
You code is filled with magic numbers. Taking the constructor of PEND
, for instance, there are five or six different constants used, none of these are explained with comments. Try to turn them into named constants, or at least comment why you've chosen the given values.
The spacing gives more emphasis to the operators.
Your code is filled with magic numbers. Taking the constructor of PEND
, for instance, there are five or six different constants used, none of these are explained with comments. Try to turn them into named constants, or at least comment why you've chosen the given values.
The spacing gives more emphasis and visibility to the operators.
Rid
is a bad abbreviation for the passwordId
. I'm not exactly sure what int raw
is representing...
###Too maymany hardcoded constants:
i
is being used to index the Password
array, which is only 70
chars in size! Aren't you getting a memory access violation when running this code? Instead os using raw arrays, consider std::array
or std::vector
, using the size()
method to query the array length.
for(int i = 0; i < key; i++)
Rid
is a bad abbreviation for the passwordId
. I'm not exactly sure what raw
is...
###Too may hardcoded constants:
i
is being used to index the Password
array, which is only 70
chars in size! Aren't you getting a memory access violation when running this code?
for(int i = 0; i < key; i++)
Rid
is a bad abbreviation for the passwordId
. I'm not exactly sure what int raw
is representing...
###Too many hardcoded constants:
i
is being used to index the Password
array, which is only 70
chars in size! Aren't you getting a memory access violation when running this code? Instead os using raw arrays, consider std::array
or std::vector
, using the size()
method to query the array length.
for(int i = 0; i < key; i++)