Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Stroustrup 5.9, exercise 10
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Alf P. Steinbach, post: 2829851"] * arnuld:[i] This looks good. I'd add an extra 'const', "const char* const arr[]", but that's it. Some people may comment on the use of 'unsigned' for the loop variable, because 'unsigned' can become problematic for a loop that counts down; however, with e.g. std::vector there are good reasons to use std::size_t for the loop variable, and that's an unsigned type too. This also looks mainly good. Improvement: in order to get warnings about some (real nasty) problems you need to add the "-O" (optimize) option, or some other optimization. The only further problem is that I seem to remember that the g++ folks have deprecated -Wall, and introduced some other option or set of options. However, I use -Wall myself. But then, I also use "-o" (out file) with Visual C++, which is an undocumented option. So perhaps I'm not the best example to follow.[/i] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Stroustrup 5.9, exercise 10
Top