Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(examples/cpp): display the results to standard output. #4040

Merged
merged 1 commit into from
Jan 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/cpp/basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ int main() {
opendal::ReaderStream stream(reader);
std::string res2;
stream >> res2; // res2 == "abc"
std::cout<<res2<<std::endl;
Copy link
Member

@dqhl76 dqhl76 Jan 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a comment on the last line to show the result.
// res2 == "abc"
I think it's not necessary to add an additional line for displaying this result to the standard output.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I noticed the comment. But for a newbie,when he run a program, there is no any outputs and the program terminated. This seems a little strange. So I think print the result is better.

}