Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added string split snippet in CPP #14

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

Merged
technoph1le merged 4 commits into quicksnip-dev:main from saminjay:cpp-string-split
Dec 30, 2024

Conversation

Copy link
Collaborator

@saminjay saminjay commented Dec 29, 2024

Added a new snippet, to split a string in CPP

Copy link

netlify bot commented Dec 29, 2024
edited
Loading

Deploy Preview for quicksnip ready!

Name Link
🔨 Latest commit 69e4ef2
🔍 Latest deploy log https://app.netlify.com/sites/quicksnip/deploys/677265ace219f4000877cf6a
😎 Deploy Preview https://deploy-preview-14--quicksnip.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@Mathys-Gasnier Mathys-Gasnier left a comment

Choose a reason for hiding this comment

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

Could you prehaps add includes to the snippets ?
It would allow users to see what is used in your snippet even before using it !

Copy link
Collaborator Author

saminjay commented Dec 30, 2024
edited
Loading

@Mathys-Gasnier Done.

Should I also add includes to the other CPP snippets?
It also needs a using namespace std.

Copy link
Collaborator

I think yeah adding includes to other example is a good thing...
But not using namespace std it's not a good practice to use it, it can introduce name conflict among other things

Copy link
Collaborator Author

Yes, it is a bad practice. That's why I didn't use it in my snippet but the other snippet doesn't include std::. If I am fixing that, I would either have to add std:: in the snippet or add using namespace std;. Not sure which one @dostonnabotov would prefer.

Copy link
Collaborator

@saminjay and @Mathys-Gasnier Thank you for taking your time to review the snippet before submitting it. I'm not very familiar with C++, so I can't help you with this one. You can decide yourselves on which one to implement.

Copy link
Collaborator Author

@Mathys-Gasnier @dostonnabotov Done.
I've added the namespace scope operator std:: and includes.

technoph1le reacted with thumbs up emoji

Copy link
Collaborator

@Mathys-Gasnier Mathys-Gasnier left a comment

Choose a reason for hiding this comment

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

Great work

technoph1le reacted with thumbs up emoji
@technoph1le technoph1le merged commit 0a0435e into quicksnip-dev:main Dec 30, 2024
4 checks passed
@saminjay saminjay deleted the cpp-string-split branch January 9, 2025 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@Mathys-Gasnier Mathys-Gasnier Mathys-Gasnier approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /