Ask your own question, for FREE!
Computer Science 7 Online
OpenStudy (walters):

c++ question can u pls run this code and help me to remove the warnings #include #include #include using namespace std; int main() { char postString[1024]=""; string dataString =""; string nameString =""; string passwordString=""; int contentLength=0; if( getenv("CONTENT_LENGTH") ) contentLength= atoi(getenv("CONTENT_LENGTH")); cin.read(postString,contentLength); dataString = postString; int namelocation = dataString.find("namebox=")+8; int endNamelocation = dataString.find("&"); int password = dataString.find("passwordbox=")+12; int endPassword = dataString.find("&button"); nameString = dataString.substr(namelocation,endNamelocation-namelocation); passwordString=dataString.substr(password,endPassword-password); cout<<"content-Type:texthtml\n\n"; cout<<"" <<""; cout<<"" <<"Bug2Bug Travel</tittle></head><body>"; if (passwordString == "coat2coat") cout<<"<hr/><p>Currnt member special:" <<"Seattle to Tokyo ($400)</p>"; else cout<<"<p>sorry u have entered incorrect password</p>"; cout<<"</body></html>"; return 0; }</p> <time datetime="2013-02-03T18:29:07+00:00" class="dateposted">13 years ago</time> </div> <!-- UNDERDOGMEDIA InPage_questioncove.com ADCODE START--> <!--<div class="udm-inpage"> <script> try { top.udm_inpage_sid = 17116 } catch (e) { console.warn('Error initializing udm inpage. Please verify you are not using an unfriendly iframe') } </script> <script src="https://bid.underdog.media/inpageLoader.js"></script> </div>--> <!-- UNDERDOGMEDIA InPage_questioncove.com ADCODE END--> <!--<ins class="adsbygoogle" style="display:block" data-ad-format="fluid" data-ad-layout-key="-ff+6a-1o-cx+ts" data-ad-client="ca-pub-5451647361488902" data-ad-slot="5410687860"></ins> <script>(adsbygoogle = window.adsbygoogle || []).push({});</script>--> <div class="question reply signup-ad"> <div class="help-header">Still Need Help?</div> <div class="help-body">Join the QuestionCove community and study together with friends!</div> <div class="signup-button" onclick="location.href = '/?utm_source=updatespage&utm_campaign=signups&utm_medium=inbetweensignupbutton'">Sign Up</div> </div><input type="hidden" name="IL_IN_ARTICLE"><div id="udm-video-content" style="width: auto; display: block; margin: auto; background-color: black;"></div><div class="question reply" id="510eac8fe4b0d9aa3c47a321" > <img class="avatar" src="/images/default-avatar.svg" alt> <span class="question-replier">OpenStudy (walters):</span> <p class="reply body"></p> <time class="dateposted" datetime="2013-02-03T18:29:35+00:00">13 years ago</time> </div> <div class="question reply" id="510eade3e4b0d9aa3c47a35e" > <img class="avatar" src="/images/default-avatar.svg" alt> <span class="question-replier">OpenStudy (walters):</span> <p class="reply body">actualy my problem is that getenv give me the warnings</p> <time class="dateposted" datetime="2013-02-03T18:35:15+00:00">13 years ago</time> </div> <div class="question reply" id="510eafaee4b0d9aa3c47a3b5" > <img class="avatar" src="/images/default-avatar.svg" alt> <span class="question-replier">OpenStudy (konradzuse):</span> <p class="reply body">you should really do what someone asks you to when they are helping you.</p> <time class="dateposted" datetime="2013-02-03T18:42:54+00:00">13 years ago</time> </div> <div class="question reply" id="510eb012e4b0d9aa3c47a3c8" > <img class="avatar" src="/images/default-avatar.svg" alt> <span class="question-replier">OpenStudy (konradzuse):</span> <p class="reply body">if( getenv("CONTENT_LENGTH") ) contentLength= atoi(getenv("CONTENT_LENGTH")); what is "CONTENT_LENGTH" "getenv" and atoi?</p> <time class="dateposted" datetime="2013-02-03T18:44:34+00:00">13 years ago</time> </div> <div class="question reply" id="510eb097e4b0d9aa3c47a3e6" > <img class="avatar" src="/images/default-avatar.svg" alt> <span class="question-replier">OpenStudy (walters):</span> <p class="reply body">atoi it convert string to integer</p> <time class="dateposted" datetime="2013-02-03T18:46:47+00:00">13 years ago</time> </div> <div class="question reply signup-ad"> <div class="help-header">Still Need Help?</div> <div class="help-body">Join the QuestionCove community and study together with friends!</div> <div class="signup-button" onclick="location.href = '/?utm_source=updatespage&utm_campaign=signups&utm_medium=inbetweensignupbutton'">Sign Up</div> </div><div class="question reply" id="510eb8c5e4b09cf125bce6e2" > <img class="avatar" src="/images/default-avatar.svg" alt> <span class="question-replier">OpenStudy (anonymous):</span> <p class="reply body">I just compiled your program with g++, but I got no warnings. Could you post the ones that you get?</p> <time class="dateposted" datetime="2013-02-03T19:21:41+00:00">13 years ago</time> </div> <div class="question reply signup"> <a href="/?utm_source=updatespage&utm_campaign=signups&utm_medium=bottomsignupbutton" class="signupreply">Click Here to Signup and join the QuestionCove Community!</a> </div> </div> <div id="right-container"> <div class="cant-find-answer"> <span class="cant-find-mobile-head">Can't find your answer?</span> <span class="cant-find-mobile-body">Make a FREE account and ask your own questions, OR help others and earn volunteer hours!<br><br>Join our real-time social learning platform and learn together with your friends!</span> <button class="cant-find-sign-up" onclick="location.href = '/?utm_source=updatespage&utm_campaign=signups&utm_medium=upsellsignupbutton'">Sign Up</button> </div> <div id="ask-a-question"> <textarea id="ask-a-question-text" placeholder="Need more help? ask your own questions for FREE!" maxlength="2500"></textarea> <button id="submit-question" onclick="askQuestion()">Ask Question</button> </div> <!--<input type="hidden" name="IL_IN_ARTICLE">--> <div class="sim-questions latest"> <span class="sim-question-head">Latest Questions</span> <div class="sim-question"> <img class="avatar" src="/assets/users/bounty/avatar/small?1776309694" alt><span class="question-replier sim-question-poster">Bounty:</span> <a href="6a08f20a30b4d0f697822000" class="reply body sim-question-text">guys I'm losing all my motivation for school work how can I motivate myself to stop being lazy because even while I'm being on my work it still piles up and</a> <div class="sim-question-details"> <span class="sim-question-detail">15 hours ago</span> <span class="sim-question-detail">2 Replies</span> <span class="sim-question-detail">1 Medal</span> </div> </div> <div class="sim-question"> <img class="avatar" src="/assets/users/albert14ring/avatar/small?1768851757" alt><span class="question-replier sim-question-poster">albert14ring:</span> <a href="6a08b36e1bc42a3b59388500" class="reply body sim-question-text">Can you give me suggestions on the fastest and most organized way to be ready early in the morning to go to school without any confusion or delay? The impor</a> <div class="sim-question-details"> <span class="sim-question-detail">1 day ago</span> <span class="sim-question-detail">8 Replies</span> <span class="sim-question-detail">0 Medals</span> </div> </div> <div class="sim-question"> <img class="avatar" src="/assets/users/twaylor/avatar/small?1747069984" alt><span class="question-replier sim-question-poster">Twaylor:</span> <a href="6a0897ff2ee5a671fcb04e00" class="reply body sim-question-text">how to make good breakfast food ingredients : 1 mother flat bread bananas peanut </a> <div class="sim-question-details"> <span class="sim-question-detail">17 hours ago</span> <span class="sim-question-detail">1 Reply</span> <span class="sim-question-detail">0 Medals</span> </div> </div> <div class="sim-question"> <img class="avatar" src="/assets/users/lovelove1700/avatar/small?1778891319" alt><span class="question-replier sim-question-poster">lovelove1700:</span> <a href="6a07953f2b471b32fd5ee600" class="reply body sim-question-text">u00bfA quu00e9 hora es tu clase?Fill in the blanks Activity unlimited attempts left Completa.</a> <div class="sim-question-details"> <span class="sim-question-detail">1 day ago</span> <span class="sim-question-detail">2 Replies</span> <span class="sim-question-detail">0 Medals</span> </div> </div> <div class="sim-question"> <img class="avatar" src="/assets/users/glomore600/avatar/small?1778686058" alt><span class="question-replier sim-question-poster">glomore600:</span> <a href="6a0719bb25116fe9ea9d8600" class="reply body sim-question-text">find someone says that that one person your talking to doesn't really like you should I take their advice and leave or should I ask the person i'm talking t</a> <div class="sim-question-details"> <span class="sim-question-detail">2 days ago</span> <span class="sim-question-detail">5 Replies</span> <span class="sim-question-detail">0 Medals</span> </div> </div> <div class="sim-question"> <img class="avatar" src="/assets/users/gr3ve3/avatar/small?1772826158" alt><span class="question-replier sim-question-poster">gr3ve3:</span> <a href="6a062a0e74920be50a0e0c00" class="reply body sim-question-text">Does anyone know how to solve/start this out?</a> <div class="sim-question-details"> <span class="sim-question-detail">2 days ago</span> <span class="sim-question-detail">5 Replies</span> <span class="sim-question-detail">0 Medals</span> </div> </div> <div class="sim-question"> <img class="avatar" src="/assets/users/addif9911/avatar/small?1778681253" alt><span class="question-replier sim-question-poster">Addif9911:</span> <a href="6a04df1067473a24c07c3c00" class="reply body sim-question-text">Him I dimmed the light that once felt mine, a glow I never meant to lose. I over-read the shadows, let voices crowd the room where only two hearts shouldu20</a> <div class="sim-question-details"> <span class="sim-question-detail">3 days ago</span> <span class="sim-question-detail">4 Replies</span> <span class="sim-question-detail">0 Medals</span> </div> </div> <div class="sim-question"> <img class="avatar" src="/assets/users/edwinjshispanic/avatar/small?1773872236" alt><span class="question-replier sim-question-poster">EdwinJsHispanic:</span> <a href="6a04be586305530d20cb1c0" class="reply body sim-question-text">Poem to my mom who proved my point "You proved my point, I am a failure. but I kinda wish, you were my savior.</a> <div class="sim-question-details"> <span class="sim-question-detail">4 days ago</span> <span class="sim-question-detail">6 Replies</span> <span class="sim-question-detail">2 Medals</span> </div> </div> <div class="sim-question"> <img class="avatar" src="/assets/users/twaylor/avatar/small?1747069984" alt><span class="question-replier sim-question-poster">Twaylor:</span> <a href="6a049d58449dc09802c3cc00" class="reply body sim-question-text">Templates for LaTeX</a> <div class="sim-question-details"> <span class="sim-question-detail">3 days ago</span> <span class="sim-question-detail">27 Replies</span> <span class="sim-question-detail">2 Medals</span> </div> </div> <div class="sim-question"> <img class="avatar" src="/assets/users/twaylor/avatar/small?1747069984" alt><span class="question-replier sim-question-poster">Twaylor:</span> <a href="6a0490773b15804ffb8d0000" class="reply body sim-question-text">Templates for LaTeX</a> <div class="sim-question-details"> <span class="sim-question-detail">4 days ago</span> <span class="sim-question-detail">25 Replies</span> <span class="sim-question-detail">0 Medals</span> </div> </div> </div> </div> </div> </div> <div id="blackback"></div> <div id="leave-popup"> <div class="cant-find-answer"> <button class="cant-find-mobile-close" title="close" onclick="qc.toggleSideBar();"></button> <span class="cant-find-mobile-head">Can't find your answer?</span> <span class="cant-find-mobile-body">Make a FREE account and ask your own questions, OR help others and earn volunteer hours!<br><br>Join our real-time social learning platform and learn together with your friends!</span> <button class="cant-find-sign-up" onclick="location.href = '/?utm_source=updatespage&utm_campaign=signups&utm_medium=popupsignupbutton'">Sign Up</button> </div> </div> <script> var questionVal = "c++ question can u pls run this code and help me to remove the warnings\n\n#include<iostream>\n#include<string>\n#include<cstdlib>\nusing namespace std;\n\nint main()\n{\n\tchar postString[1024]=\"\";\n\tstring dataString =\"\";\n\tstring nameString =\"\";\n\tstring passwordString=\"\";\n\tint contentLength=0;\n\n\n\tif( getenv(\"CONTENT_LENGTH\") )\n\t\tcontentLength= atoi(getenv(\"CONTENT_LENGTH\"));\n\tcin.read(postString,contentLength);\n\tdataString = postString;\n\n\tint namelocation = dataString.find(\"namebox=\")+8;\n\tint endNamelocation = dataString.find(\"&\");\n\tint password = dataString.find(\"passwordbox=\")+12;\n\tint endPassword = dataString.find(\"&button\");\n\n\tnameString = dataString.substr(namelocation,endNamelocation-namelocation);\n\tpasswordString=dataString.substr(password,endPassword-password);\n\n\tcout<<\"content-Type:texthtml\\n\\n\";\n\n\tcout<<\"<?xml version = \\\"1.0\\\"?>\"\n\t\t<<\"<!DOCTYPE html PUBLIC\\\"-\/\/W3C\/\/DTD XHTML 1.1\/\/EN\\\"\"\n\t\t<<\"\\\"htp:\/\/www.w3.org\/TR\/xhtml11\/DTD\/xhtml11.dtd\\\">\";\n\n\tcout<<\"<html xmlns =\\\"http:\/\/www.w3.org\/1999\/xhtml\\\">\"\n\t\t<<\"<head><title>Bug2Bug Travel<\/tittle><\/head><body>\";\n\n\tif (passwordString == \"coat2coat\")\n\t\tcout<<\"<hr\/><p>Currnt member special:\"\n\t\t<<\"Seattle to Tokyo ($400)<\/p>\";\n\telse \n\t\tcout<<\"<p>sorry u have entered incorrect password<\/p>\";\n\tcout<<\"<\/body><\/html>\";\n\treturn 0;\n}"; var questionId = "510eac73e4b0d9aa3c47a317"; </script> <script src="/javascripts/jquery.min.js" defer></script> <script src="/javascripts/updates.js?v1.4.7" defer></script> <script src="/javascripts/placeholder.js" defer></script> <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" defer> <!--<script type="text/javascript"> var infolinks_pid = 3241206; var infolinks_wsid = 0; </script> <script data-cfasync="false" language="javascript" async src="https://udmserve.net/udm/img.fetch?sid=15754;tid=1;dt=6;"></script> <script type="text/javascript" src="//resources.infolinks.com/js/infolinks_main.js"></script>--> </body> <html>