{"id":134,"date":"2024-02-21T14:39:22","date_gmt":"2024-02-21T14:39:22","guid":{"rendered":"https:\/\/sites.tntech.edu\/acrockett\/?p=134"},"modified":"2024-02-21T14:39:23","modified_gmt":"2024-02-21T14:39:23","slug":"validating-user-input-in-c","status":"publish","type":"post","link":"https:\/\/sites.tntech.edu\/acrockett\/2024\/02\/21\/validating-user-input-in-c\/","title":{"rendered":"Validating User Input in C++"},"content":{"rendered":"\n<p>This video teaches the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>C++ input\/output stream error bits (goodbit, badbit, eofbit, and failbit) and the functions to test those bits <br>(from start of video to 6:30)<\/li>\n\n\n\n<li>Best way to validate user input with code demonstration so that if the user enters in a character or a string instead of an integer, your program won&#8217;t crash<br>(from 6:30 to 21:06)<\/li>\n\n\n\n<li>How to implement &#8220;Press enter to continue.&#8221;<br>(from 21:06 to 24:02)<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Validating User Input in C++\" width=\"1140\" height=\"641\" src=\"https:\/\/www.youtube.com\/embed\/tHRzzAKYkdo?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>This video teaches the following:<\/p>\n","protected":false},"author":119,"featured_media":131,"comment_status":"open","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[18,22,21],"class_list":{"0":"post-134","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-c","8":"tag-c","9":"tag-iostream","10":"tag-validating-user-input","11":"czr-hentry"},"_links":{"self":[{"href":"https:\/\/sites.tntech.edu\/acrockett\/wp-json\/wp\/v2\/posts\/134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.tntech.edu\/acrockett\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.tntech.edu\/acrockett\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.tntech.edu\/acrockett\/wp-json\/wp\/v2\/users\/119"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.tntech.edu\/acrockett\/wp-json\/wp\/v2\/comments?post=134"}],"version-history":[{"count":1,"href":"https:\/\/sites.tntech.edu\/acrockett\/wp-json\/wp\/v2\/posts\/134\/revisions"}],"predecessor-version":[{"id":135,"href":"https:\/\/sites.tntech.edu\/acrockett\/wp-json\/wp\/v2\/posts\/134\/revisions\/135"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sites.tntech.edu\/acrockett\/wp-json\/wp\/v2\/media\/131"}],"wp:attachment":[{"href":"https:\/\/sites.tntech.edu\/acrockett\/wp-json\/wp\/v2\/media?parent=134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.tntech.edu\/acrockett\/wp-json\/wp\/v2\/categories?post=134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.tntech.edu\/acrockett\/wp-json\/wp\/v2\/tags?post=134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}