public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Roger K. Wells" <ROGER.K.WELLS@saic.com>
To: cygwin@cygwin.com
Subject: Re: Executing a basic program
Date: Sat, 21 May 2011 23:30:00 -0000	[thread overview]
Message-ID: <4DD84AC8.5030702@saic.com> (raw)
In-Reply-To: <31668838.post@talk.nabble.com>

On 05/20/2011 10:10 PM, Agnelomaria wrote:
> 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
>
we need some filenames here.
roger wells
> 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"));
>
> }
>
>


-- 
Roger Wells, P.E.
SAIC
221 Third St
Newport, RI 02840
401-847-4210 (voice)
401-849-1585 (fax)
roger.k.wells@saic.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

  parent reply	other threads:[~2011-05-21 23:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-21  2:11 Agnelomaria
2011-05-21  3:48 ` Buchbinder, Barry (NIH/NIAID) [E]
2011-05-21  4:25   ` Agnelomaria
2011-05-21 23:30 ` Roger K. Wells [this message]
2011-05-21 23:31 ` Roger K. Wells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DD84AC8.5030702@saic.com \
    --to=roger.k.wells@saic.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).