Click here to Skip to main content
15,888,301 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: To bool or not to bool in C/C++ ? Pin
Vaclav_22-Feb-20 5:34
Vaclav_22-Feb-20 5:34 
GeneralRe: To bool or not to bool in C/C++ ? Pin
Richard MacCutchan22-Feb-20 6:47
mveRichard MacCutchan22-Feb-20 6:47 
GeneralRe: To bool or not to bool in C/C++ ? Pin
leon de boer23-Feb-20 5:29
leon de boer23-Feb-20 5:29 
GeneralRe: To bool or not to bool in C/C++ ? Pin
Richard MacCutchan23-Feb-20 6:08
mveRichard MacCutchan23-Feb-20 6:08 
GeneralRe: To bool or not to bool in C/C++ ? Pin
Victor Nijegorodov23-Feb-20 20:43
Victor Nijegorodov23-Feb-20 20:43 
GeneralText based mining game using if and while Pin
Chleba22519-Feb-20 10:41
Chleba22519-Feb-20 10:41 
GeneralRe: Text based mining game using if and while Pin
Stefan_Lang19-Feb-20 21:42
Stefan_Lang19-Feb-20 21:42 
GeneralRe: Text based mining game using if and while Pin
Vaclav_20-Feb-20 17:04
Vaclav_20-Feb-20 17:04 
Not bad for start.
It is not that uncommon to start what my boss used to called "spaghetti code".
As long as your first code runs you can follow the flow and rearrange the actual code as you go.
The basic concept of the application is what is important.
You can identify the repetitive code and make classes or functions - as long as it continues to compile and run.
Personally I look at writing code and application separately.
And often I do not follow "top down " concept , but look at both application (tasks) and code as kind-off puzzle / mosaic.

Do not get discouraged by "code is too big, hard to follow..." comments.
I do understated that most folks just excpect to "cut and paste and run" posted code and if it does not they get frustrated.

You asked for comments on your coding style and you have received very good ones, if your posted does not compile / run is immaterial.

Now off the soap box and some real advise

When your declare a variable get into habit to initialize it and comment (what is) its purpose.
You are writing code to yourself , but do as is used to do in Chicago
"vote early and often "
comment and over comment what the code does - you will thank yourself later when it gets REALLY big !
Good luck
GeneralRe: Text based mining game using if and while Pin
Chleba22521-Feb-20 20:32
Chleba22521-Feb-20 20:32 
SuggestionRe: Text based mining game using if and while Pin
David Crow24-Feb-20 3:44
David Crow24-Feb-20 3:44 
QuestionCannot open file 'hid.lib' in microsip Pin
Jafar_Ulla19-Feb-20 2:14
professionalJafar_Ulla19-Feb-20 2:14 
AnswerRe: Cannot open file 'hid.lib' in microsip Pin
CPallini19-Feb-20 2:51
mveCPallini19-Feb-20 2:51 
QuestionUse of string class in c++ Pin
Awantika Singh14-Feb-20 21:26
Awantika Singh14-Feb-20 21:26 
AnswerRe: Use of string class in c++ Pin
Victor Nijegorodov14-Feb-20 21:35
Victor Nijegorodov14-Feb-20 21:35 
AnswerRe: Use of string class in c++ Pin
Stephane Capo14-Feb-20 21:38
professionalStephane Capo14-Feb-20 21:38 
GeneralRe: Use of string class in c++ Pin
Awantika Singh15-Feb-20 4:27
Awantika Singh15-Feb-20 4:27 
GeneralRe: Use of string class in c++ Pin
Richard MacCutchan15-Feb-20 5:06
mveRichard MacCutchan15-Feb-20 5:06 
GeneralRe: Use of string class in c++ Pin
Stephane Capo15-Feb-20 21:52
professionalStephane Capo15-Feb-20 21:52 
GeneralRe: Use of string class in c++ Pin
k505416-Feb-20 3:30
mvek505416-Feb-20 3:30 
GeneralRe: Use of string class in c++ Pin
Richard MacCutchan16-Feb-20 4:58
mveRichard MacCutchan16-Feb-20 4:58 
GeneralRe: Use of string class in c++ Pin
CPallini16-Feb-20 7:28
mveCPallini16-Feb-20 7:28 
GeneralRe: Use of string class in c++ Pin
Stefan_Lang16-Feb-20 22:43
Stefan_Lang16-Feb-20 22:43 
GeneralRe: Use of string class in c++ Pin
CPallini16-Feb-20 23:02
mveCPallini16-Feb-20 23:02 
QuestionVfW Saving Compression Options Pin
Member 1305023114-Feb-20 5:35
Member 1305023114-Feb-20 5:35 
AnswerRe: VfW Saving Compression Options Pin
Richard MacCutchan14-Feb-20 6:01
mveRichard MacCutchan14-Feb-20 6:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.