add cout args
This commit is contained in:
@@ -3,5 +3,8 @@
|
|||||||
// compile: c++ --std=c++17 hello_main.cc
|
// compile: c++ --std=c++17 hello_main.cc
|
||||||
auto main(int argc, char** argv) -> int {
|
auto main(int argc, char** argv) -> int {
|
||||||
std::cout << "hello, have: " << argc << " args" << std::endl;
|
std::cout << "hello, have: " << argc << " args" << std::endl;
|
||||||
|
for (int i = 0; i < argc; i++) {
|
||||||
|
std::cout << " - " << argv[i] << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user