From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4842 invoked by alias); 21 May 2011 02:11:11 -0000 Received: (qmail 4832 invoked by uid 22791); 21 May 2011 02:11:10 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,TW_CX,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from sam.nabble.com (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 21 May 2011 02:10:50 +0000 Received: from isper.nabble.com ([192.168.236.156]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1QNbeT-0002wt-U6 for cygwin@cygwin.com; Fri, 20 May 2011 19:10:49 -0700 Message-ID: <31668838.post@talk.nabble.com> Date: Sat, 21 May 2011 02:11:00 -0000 From: Agnelomaria To: cygwin@cygwin.com Subject: Executing a basic program MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-05/txt/msg00317.txt.bz2 Hi, I am just learning to program in C++ . I am following a book called Exploring C++ . The first task is to execute the code which I will paste below. I have compiled the code . I tried executing the code using ./a.exe command but the code does not seem to terminate. I have no idea what the code means. the book asks the user to try the code so as to get familiarized with the coding environment. Could someone please help me execute the code. I am not sure what input I should provide Code : ///sort the standard input alphabetically ///read teh lines of the text sort themand print theresults tothe standard output. ///if the command line names a file, read from that file. Otherwise, read fromt he standard input. ///the entire file is stored int he memory so donot tyr thiswiht input files that ecxeed the size of the ram #include #include #include #include #include #include #include void read(std::istream& in, std::vector& text) { std::string line; while (std::getline(in, line)) text.push_back(line); } int main(int argc, char* argv[]) { //Part1.read the entire input into the text.. If the command line names a file, read that file. Otherwise ,read the standard input std::vector text; ///(std::cout, "\n")); } -- View this message in context: http://old.nabble.com/Executing-a-basic-program-tp31668838p31668838.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple