Join Bill Weinman for an in-depth discussion in this video Presentation and display, part of Code Clinic: C++.
- Once we have our list of results, we…need to present those results to the user.…My solution provides two ways to print results.…Again, this is a command line program.…One way simply prints a series of numbers…representing the position of the Queen on each row.…And it looks like this.…And the other prints a text based representation of a…chessboard with the Queens placed in…their positions and that looks like this.…We can scroll back and see all of the ten solutions…there for the five by five board with five Queens.…
And this is all done in the NQ class.…In the solve row, once we have found a solution for…all the rows in a given board, we go ahead and print…that board, and we call the print board or print…shorthand depending on the short flag or the board flag.…So to print the short hand, it simply prints it on…all one row and it simply prints the number that is…stored in that particular row in the, looking over here…we can see that underscore row is simply an array of…unsigned integers, and that was…allocated remember up here in a nit.…
Bill introduces challenges and provides an overview of his solutions in C++. Challenges include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.
Visit other courses in the series to see how to solve the exact same challenges in languages like C#, Java, PHP, Python, and Ruby.
Skill Level Intermediate
Problem One: Exploring Lake Pend Oreille
Solution overview2m 51s
Problem Two: Image Analysis
Problem Three: Eight Queens
Problem Four: Accessing Peripherals
Problem Five: Recursion and Directories
Problem Six: Building the Web
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.