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

Conversation

SYaoJun
Copy link

@SYaoJun SYaoJun commented Jan 21, 2024

No description provided.

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

Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thanks!

@Xuanwo
Copy link
Member

Xuanwo commented Jan 21, 2024

Our cpp example is so simple that doesn't meet realistic use cases. Welcome to join in the improvement!

@Xuanwo Xuanwo merged commit 2d05680 into apache:main Jan 21, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants