I Just wanted to get
#include<bits/stdc++.h>
using namespace std;
int main()
{
system("cls");
int t; cin>>t;
while(t--)
{
}
exit(0);
}
auto-complete snippet when i type #include
in VS code
so inside cpp.json
file of vs code added this
{
"Print to console": {
"prefix": "#include"
"body": [
"#include<bits/stdc++.h>"
"using namespace std;\n"
"int main()"
"{"
"system("cls");\n"
"int t; cin>>t;"
"while(t--)"
"{"
"\t $1"
"}"
"\t exit(0);"
"}"
],
"description": "basic structure for CP"
}
}
But when i get the snippet the "cls" word is not getting printed instead iam getting the output as
#include<bits/stdc++.h>
using namespace std;
int main()
{
system(
);
int t; cin>>t;
while(t--)
{
}
exit(0);
}
"cls" is missing.
can anyone help me sorting out the issue
you can even suggest me any other command or way to clear screen automatically before output using code itself
if any alternative for system("cls")
in VS code which doesn't give me this problem when set in user snippet.