public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Executing a basic program
@ 2011-05-21  2:11 Agnelomaria
  2011-05-21  3:48 ` Buchbinder, Barry (NIH/NIAID) [E]
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Agnelomaria @ 2011-05-21  2:11 UTC (permalink / raw)
  To: cygwin


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Executing a basic program
  2011-05-21  2:11 Executing a basic program 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
  2011-05-21 23:31 ` Roger K. Wells
  2 siblings, 1 reply; 5+ messages in thread
From: Buchbinder, Barry (NIH/NIAID) [E] @ 2011-05-21  3:48 UTC (permalink / raw)
  To: cygwin, 'Agnelomaria'

Agnelomaria wrote on Friday, May 20, 2011 10:11 PM

> I am just learning to program in C++.

I couldn't help you if I wanted to, but you are
off topic for this list.  You might look elsewhere,
because, from past experience I doubt anyone here
will help.

Just wanting to save you some time.

Good luck

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Executing a basic program
  2011-05-21  3:48 ` Buchbinder, Barry (NIH/NIAID) [E]
@ 2011-05-21  4:25   ` Agnelomaria
  0 siblings, 0 replies; 5+ messages in thread
From: Agnelomaria @ 2011-05-21  4:25 UTC (permalink / raw)
  To: cygwin


Thank you .. I will try asking others 



Buchbinder, Barry (NIH/NIAID) [E] wrote:
> 
> Agnelomaria wrote on Friday, May 20, 2011 10:11 PM
> 
>> I am just learning to program in C++.
> 
> I couldn't help you if I wanted to, but you are
> off topic for this list.  You might look elsewhere,
> because, from past experience I doubt anyone here
> will help.
> 
> Just wanting to save you some time.
> 
> Good luck
> 
> - Barry
>   Disclaimer: Statements made herein are not made on behalf of NIAID.
> 
> --
> 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
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Executing-a-basic-program-tp31668838p31669133.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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Executing a basic program
  2011-05-21  2:11 Executing a basic program Agnelomaria
  2011-05-21  3:48 ` Buchbinder, Barry (NIH/NIAID) [E]
@ 2011-05-21 23:30 ` Roger K. Wells
  2011-05-21 23:31 ` Roger K. Wells
  2 siblings, 0 replies; 5+ messages in thread
From: Roger K. Wells @ 2011-05-21 23:30 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Executing a basic program
  2011-05-21  2:11 Executing a basic program Agnelomaria
  2011-05-21  3:48 ` Buchbinder, Barry (NIH/NIAID) [E]
  2011-05-21 23:30 ` Roger K. Wells
@ 2011-05-21 23:31 ` Roger K. Wells
  2 siblings, 0 replies; 5+ messages in thread
From: Roger K. Wells @ 2011-05-21 23:31 UTC (permalink / raw)
  To: cygwin

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.
then I'll try to help.
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-05-21 23:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-21  2:11 Executing a basic program 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
2011-05-21 23:31 ` Roger K. Wells

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).