Join Bill Weinman for an in-depth discussion in this video Command line interface, part of Code Clinic: C++.
- View Offline
- Exercise Files
- Like most of my C++ solutions in this series,…my nQueen solution uses a command line interface.…Let's take a look at how this works.…Here I have all the files for this particular solution.…I'm just going to type "make"…and that will run the Make file…and compile this all into one executable.…Then I can type dot slash nQueens.…I'm on a Unix sytem here.…It's actually Red Hat Linux,…and this is one of my servers out at rack space.…If I just type nQueens by itself,…it will default to solving for eight queens…on an eight by eight board.…
It finds 92 solutions, which we know…is the correct answer.…I can specify that I want to solve for five queens…on a five by five board…by simply typing a five here,…and I get 10 solution.…Or I can solve for 12, if I want to,…and I'll see there's 14,200 solutions.…And these are the right answers.…If I want to, I can get a list of the solutions…by typing dash dash short.…I can use any number of dashes.…I can use one dash or three dashes, it doesn't matter.…
We'll see how I do that in the code later.…
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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.