{"id":33999,"date":"2016-03-13T02:28:46","date_gmt":"2016-03-13T08:28:46","guid":{"rendered":"http:\/\/orlando2120.wordpress.com\/?p=378"},"modified":"2016-03-13T03:16:43","modified_gmt":"2016-03-13T09:16:43","slug":"the-needle-in-the-haystack-wsq12","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2016\/2016\/03\/the-needle-in-the-haystack-wsq12\/","title":{"rendered":"The Needle in the Haystack (WSQ12)"},"content":{"rendered":"<p><a href=\"https:\/\/www.flickr.com\/photos\/circleyq\/22946295261\/\" >Photograph credit<\/a><\/p>\n<p>This program was really hard to make. I think that is because we have never worked with something other than the monitor to run our programs. Now we had to involve a text file. I started this program on friday and all I have been doing is this, I finally finished and I want \u00a0to help you guys so it doesn&#8217;t take you so long. I think I easily read like 6 webpages, checked in 4 books and watched 7 youtube videos to find out how to do this program. That was the thing that consumed most of my time.<\/p>\n<p>I&#8217;m gonna save your time and tell you the information that was helpful. My tutorial is divided in three sections: the first is just an introduction, the second is how to find a word in a string and the third is how to find the word in a whole text file. First you need to know how to open, close, input and output to a file. for that\u00a0<a href=\"http:\/\/www.cplusplus.com\/doc\/tutorial\/files\/\" >check out this page<\/a>. Then you need to know how to work with strings to find a word in it. And the rest is to use your brain for the logic of the program. I looked in so many places really, but there was one book that had THE ANSWERS TO ALL MY PROBLEMS, I wish I had looked there in the first place. AND WHERE IS THIS BOOK?! Well.. believe it or not, it&#8217;s <a href=\"http:\/\/www.greenteapress.com\/thinkcpp\/\" >the book for our course<\/a>. Yeah I know, who would have known. This is the first time I look at it. In my tutorial I explain how to get it but you can just press this link and download the PDF.<\/p>\n<p><span id=\"more-378\"><\/span><\/p>\n<p>As usual here is my code:<\/p>\n<p><a href=\"https:\/\/github.com\/OrlandoLara21\/Coding-on-C-\/blob\/Engineer\/WordCount\" >WordCountText.cpp<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/OrlandoLara21\/Coding-on-C-\/blob\/Engineer\/WordCountString\" >WordCountString.cpp<\/a><\/p>\n<p>And here are the <\/p>\n<div class=\"post-limited-image\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/03\/01007114e038f359e784c65586e03634.jpg\" \/><\/div>\n<div class=\"post-limited-image\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/03\/6f7f85a742ce1b8cddebf7270f8a65e9.jpg#038;blog=105225774&#038;%23038;post=378&#038;%23038;subd=orlando2120&#038;%23038;ref=&#038;%23038;feed=1\" width=\"1\" height=\"1\" \/><\/div>\n<p><!--more--> videos. I recommend you watch them in order but it&#8217;s your choice.<\/p>\n<div class=\"jetpack-video-wrapper\"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text\/html' width='700' height='424' src='https:\/\/www.youtube.com\/embed\/TzC1YneJMU4?version=3&#038;rel=1&#038;%23038;fs=1&#038;%23038;autohide=2&#038;%23038;showsearch=0&#038;%23038;showinfo=1&#038;%23038;iv_load_policy=1&#038;%23038;wmode=transparent' frameborder='0' allowfullscreen='true'><\/iframe><\/span><\/div>\n<div class=\"jetpack-video-wrapper\"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text\/html' width='700' height='424' src='https:\/\/www.youtube.com\/embed\/AdtgvIEmhuY?version=3&#038;rel=1&#038;%23038;fs=1&#038;%23038;autohide=2&#038;%23038;showsearch=0&#038;%23038;showinfo=1&#038;%23038;iv_load_policy=1&#038;%23038;wmode=transparent' frameborder='0' allowfullscreen='true'><\/iframe><\/span><\/div>\n<div class=\"jetpack-video-wrapper\"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text\/html' width='700' height='424' src='https:\/\/www.youtube.com\/embed\/_3QCWMMAfVM?version=3&#038;rel=1&#038;%23038;fs=1&#038;%23038;autohide=2&#038;%23038;showsearch=0&#038;%23038;showinfo=1&#038;%23038;iv_load_policy=1&#038;%23038;wmode=transparent' frameborder='0' allowfullscreen='true'><\/iframe><\/span><\/div>\n<p>Made by Orlando Lara<\/p>\n<p>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/orlando2120.wordpress.com\/378\/\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/03\/01007114e038f359e784c65586e03634.jpg\" \/><\/a> <img loading=\"lazy\" decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/03\/6f7f85a742ce1b8cddebf7270f8a65e9.jpg#038;blog=105225774&#038;%23038;post=378&#038;%23038;subd=orlando2120&#038;%23038;ref=&#038;%23038;feed=1\" width=\"1\" height=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Photograph credit This program was really hard to make. I think that is because we have never worked with something other than the monitor to run our programs. Now we had to involve a text file. I started this program on friday and all I have been doing is this, I finally finished and I &hellip; <a href=\"https:\/\/kenscourses.com\/tc101winter2016\/2016\/03\/the-needle-in-the-haystack-wsq12\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The Needle in the Haystack (WSQ12)<\/span><\/a><\/p>\n","protected":false},"author":39,"featured_media":34003,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[159,160,62,226],"class_list":["post-33999","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-lara","tag-sciencelife","tag-coding","tag-wsq12"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/33999","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/comments?post=33999"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/33999\/revisions"}],"predecessor-version":[{"id":34007,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/33999\/revisions\/34007"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media\/34003"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media?parent=33999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/categories?post=33999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/tags?post=33999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}