Skip to content

Commit

Permalink
Update ex6_25_26.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooophy authored and pezy committed Jun 22, 2015
1 parent 9399c05 commit 13eb713
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ch06/ex6_25_26.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! @Alan
//! @Yue Wang
//!
//! Exercise 6.25: Write a main function that takes two arguments.
//! Concatenate the supplied arguments and print the resulting string.
Expand All @@ -7,19 +7,14 @@
//! in this section. Print the values of the arguments passed to main.
//!



#include <iostream>
#include <string>

int main(int argc, char **argv)
{
std::string str;
for (int i = 1; i != argc; ++i)
{
str += argv[i];
str += " ";
}
str += argv[i] + " ";

std::cout << str << std::endl;
return 0;
Expand Down

0 comments on commit 13eb713

Please sign in to comment.