This is the mail archive of the
mailing list for the Cygwin project.
Executing a basic program
- From: Agnelomaria <agnelomaria at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 20 May 2011 19:10:49 -0700 (PDT)
- Subject: Executing a basic program
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
///sort the standard input alphabetically
///read teh lines of the text sort themand print theresults tothe standard
///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
void read(std::istream& in, std::vector& text)
while (std::getline(in, 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
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple