Intro and my first program

+2 Jeroen Bouwen · September 28, 2015
Hi all,

I just signed up and thought I'd introduce myself. My name is Jeroen, I'm from Amsterdam, the Netherlands and have been going through Bucky's c++ tuts the past weeks. I'm a director of IT for several psychiatric clinics in the Netherlands, studied psychology and love rock climbing. Nice to meet you all.

I had one question: after going through about half of Bucky's tutorials I wrote a small program to put some stuff into practise. I was wondering if it's appropriate in this forum to post a pastebin of my code and ask for some feedback. Just curious how I'm doing style wise.

Thanks!
Jeroen

Post a Reply

Replies

Oldest  Newest  Rating
0 Jeroen Bouwen · September 29, 2015
Cool thanks :)

So this is what I wrote. And I'm especially curious about conventions about what kind of functionality to put in separate functions and what to keep in main()

http://pastebin.com/VSuBTFD2
0 Alan Masimba Walker · October 3, 2015
That is some neat, neat code! I wish the first program I wrote, after doing a set of Bucky's tutorials, looked that clean. Some good habits shown there.
0 c student · October 3, 2015
@Krootushas Gesu
can you direct me to the source where it states standard convention or otherwise to have the functions before main?  imo, it's down to personal preference whether to have function prototypes, however, if you wanted to go technical, afaik, it's standard convention in c++ to have function prototypes in the header, the related functions go in their respective cpp file and main goes in its own.
0 Jeroen Bouwen · October 4, 2015
Thanks for the feedback!

Krootushas, could you explain your 1) please? After Bucky's tutorials I got the impression that prototyping is a good practice to provide a concise insight into the all functions in the program and parameters they take and return values at a single glance. What thoughts make you root for the everything-before-main cause?

Second question if I may: can you recommend a good howto or tutorial on input protection?
0 c student · October 4, 2015
if i were working on a project with few hundred functions, i would split them into different files which would require prototyping in headers.  easier to manage things.
  • 1

C++

107,122 followers
About

Used in many types of software including music players, video games, and many large scale applications.

Links
Moderators
Bucky Roberts Administrator