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

Clear screen functionality #6

Open
Nailsonseat opened this issue Oct 18, 2023 · 2 comments
Open

Clear screen functionality #6

Nailsonseat opened this issue Oct 18, 2023 · 2 comments
Assignees
Labels
easy enhancement New feature or request

Comments

@Nailsonseat
Copy link
Owner

Clear screen functionality

  • Throughout the code you will see comments such as // system("cls");
  • They are commented as they are deprecated
  • Replace every occurrences of // system("cls"); with its modern substitute
@Nailsonseat Nailsonseat added enhancement New feature or request hacktoberfest Part of open source hacktoberfest easy labels Oct 18, 2023
@SharonIV0x86
Copy link

system("cls") is an OS-specific command.
The C++ standard doesn't know what a command prompt/console is nor does it particularly care. All it knows is that it can put data into the stdout buffer and the OS will take it and do whatever it does with it.
As such there isn't a C++ standard "clear the console" function because that's outside the scope of things that C++ cares about.

#ifdef _WIN32
#define SYSTEM_CLEAR_COMMAND_STR "cls"
#else
#define SYSTEM_CLEAR_COMMAND_STR "clear"
#endif
done

I can work on this issue to create a cross platform clear console function that works on both windows and linux if this issue is assigned to me.

@Nailsonseat
Copy link
Owner Author

Hi @SharonIV0x86 sorry for the late response, I definitely learned something new with your comment here. You are free to make a PR on this issue. also I would like to discuss something related to my new project, since you are into cybersecurity, i have dropped you a mail.

@Nailsonseat Nailsonseat removed the hacktoberfest Part of open source hacktoberfest label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants