Restricted keywords

5 replies [Last post]
JabMan1
Offline
Last seen: 9 years 23 weeks ago
Joined: 2010-05-28
bOt Points: 82

Why when I use BootSkool's online compiler do I get a message saying "restricted keyword used"?

Here is the code I wrote:
include

#define Message1 " THIS IS A TEST"
#define Message2 " are these restricted keywords?"

int main ()
{
cout << Message1 << endl;
cout << Message2;
cout << endl << endl Message1 << endl << endl;
cout << Message2 << endl;
return (0);
}

Also, where can i get a list of restricted keywords?

shashwat
Offline
Last seen: 1 year 31 weeks ago
Joined: 2009-02-18
bOt Points: 1160
The list of the restricted

The list of the restricted keywords cannot be disclosed as it will make online compiler insecure. You cannot use #define.

Founder and Admin

JabMan1
Offline
Last seen: 9 years 23 weeks ago
Joined: 2010-05-28
bOt Points: 82
Oh ok, Thank you  

Oh ok,

Thank you

 

JabMan1
Offline
Last seen: 9 years 23 weeks ago
Joined: 2010-05-28
bOt Points: 82
Once again I ran into a

Once again I ran into a restricted key word.
can someone tell me which one it is?

Here is the code;
// A simple help system.

#include
using namespace std;

int main()

{
char choice;

cout << "Help on: \n";
cout << " 1. if\n";
cout << " 2. switch\n";
cout << "Choose one: ";
cin >> choice;
cout <<"\n";

switch (choice)
{
case '1':
cout << "The switch:\n\n";
cout <<"if(condition) statement; \n";
cout << "else statement; \n";
break;
case '2':
cout << "The switch:\n\n";
cout << "switch(expression) {\n";
cout << " case constant: \n";
cout << " statement sequence|n";
cout << " break;\n";
cout << " }\n";
break;
default:
cout << "Selection not found.\n";
}
return 0;
}

Note:- This post has been edited by JabMan1 at Wed, 2010-09-22 00:05.

shashwat
Offline
Last seen: 1 year 31 weeks ago
Joined: 2009-02-18
bOt Points: 1160
Hi JabMan1, Its working.

Hi JabMan1,

Its working. Checking out the screenshot.

online compiler output 

Founder and Admin

JabMan1
Offline
Last seen: 9 years 23 weeks ago
Joined: 2010-05-28
bOt Points: 82
I am still getting the

I am still getting the restricted keyword error. :(