--AA-- AA--AA AA--AA AAAAAA AA--AA AA--AA BBBB-- B---BB BBBB-- B---BB B---BB BBBB-- --CC-- CC--CC CC---- CC---- CC--CC --CC-- DDDD-- D---DD D---DD D---DD D---DD DDDD-- EEEEEE EE---- EEEEEE EE---- EE---- EEEEEE FFFFFF FF---- FFFF-- FF---- FF---- FF---- --GG-- GG--GG GG---- GG-GGG GG--GG --GG-- |
|
|
|
|
|
|
|
|
|
|
letterfile >> box[q][z];//initialize box from the txt
the comment should explain not what is happening, but instead what your intentions are. In this case, I can clearly see that you are initializing the 'box' from the 'txt'. I don't need you to tell me that, I need to instead know you intentions as the coder and why this line is important.int
and size_t // typedef'd as unsigned int usually.
This will give you a warning at compile time and you should fix ALL warnings no matter how benign you may think they are.int
, "n" is used to mean float/double
, "v" is used to mean typename [] // Array
, "p" is used to mean * // pointer
, "C" is used to mean class
, "S" is used to mean struct
, "E is used to mean enum
, "l_" is used to mean static
, "m" is used to mean "class member", and lastly "g_" is use for global variables (all functions start with capitals). I use these prefixes like so:
|
|
#define DIM(x) (sizeof(x)/sizeof(*(x)))
char output [whole_length][6];
in this function at all, which is good because declaring the dimensions dynamically in that way is bogus anyway.
|
|
|
|
letters.push_back(alphabet(sentence[b]));
value-'a'
HH HH EEEEEE LL LL OO HH HH EE LL LL OO OO HHHHHH EEEEEE LL LL OO OO HH HH EE LL LL OO OO HH HH EE LL LL OO OO HH HH EEEEEE LLLLLL LLLLLL OO MM MM YY YY M MM M YY__YY M M YYYY M M YY M M YY MM MM YY NN NN AA MM MM EEEEEE N N N AA AA M MM M EE N N N AA AA M M EEEEEE N NN AAAAAA M M EE N N AA AA M M EE NN NN AA AA MM MM EEEEEE IIII SS II SS SS II SS II SS II SS SS IIII SS DDDD EEEEEE V V OO NN NN D DD EE V V OO OO N N N D DD EEEEEE VV VV OO OO N N N D DD EE VV VV OO OO N NN D DD EE VVVV OO OO N N DDDD EEEEEE VV OO NN NN |
|
|
|
|
you make the same thing look soooo easy, in so few lines :/ |
|
|
|
|