Sunday, 19 October 2014

c plus plus Reserved words

Leave a Comment

Reserved words

The syntax rules (or grammar) of C++ define certain symbols to have a unique meaning within a C++ program. These symbols, the reserved words, must not be used for any other purposes. The reserved words already used are int and void. All reserved words are in lower-case letters. The table below lists the reserved words of C++. C++ Reserved Words
and
and_eq
asm


bitor
bool
break


char
class
const


default
delete
do


else
enum
explicit


false
float
for


if
inline
int


namespace
new
not


or
or_eq
private


register
reinterpret_cast
return


sizeof
static
static_cast


template
this
throw


typedef
typeid
typename


using
virtual
void


while
xor
xor_eq
auto
bitand

case
catch

const_cast
continue

double
dynamic_cast

export
extern

friend
goto

long
mutable

not_eq
operator

protected
public

short
signed

struct
switch

true
try

union
unsigned

volatile
wchar_t



Some of these reserved words may not be treated as reserved by older compilers. However you would do well to avoid their use. Other compilers may add their own reserved words. Typical are those used by Borland compilers for the PC, which add nearfarhugecdecl, and pascal.
Notice that main is not a reserved word. However, this is a fairly technical distinction, and for practical purposes you are advised to treat maincin, and cout as if they were reserved as well.
If You Enjoyed This, Take 5 Seconds To Share It

0 Questions:

Labels

Additional Questions Advantages of C Language Advantages of C over C++ and naming them array programs arrays Basic Problems c language projects C plus plus project C Primer Plus c programming sample projects C programs C Projects C Structures C Tutorials C/C++ Shapes C++ Basic Problems C++ Books Solution C++ Functions C++ Language C++ Loops and Decisions C++ Program Examples C++ Programs c++ projects C++ Shapes Code C++ Structures C++ Tips and Tricks C++ Tutorials Control Structures CPP Enum CPP Pointers CPP Vector cppexamples CppStruct Cryptography DataStructures difference between a keyword and a user-defined identifier Disadvantages of C Language Ds malik Ds malik c++ programming Chapter 2: Basic Elements of C++ Solution Ds malik c++ programming Chapter 4: Control Structures I (Selection) Solution else if nested if File Handling in C++ fstream History of C language how to learn c language how to learn c programming Identifiers if statement ifstream language c learn c programming Learn C++ Linked List LinkedList list of all the C++ keywords Loops Loops practice using shapes Magic Squares Puzzle without using Recursion MathProblems nested loop Object Oriented Programming in C++ by Robert Lafore - 4th Edition Chapter 1 Object Oriented Programming in C++ by Robert Lafore - 4th Edition Chapter 2 Object Oriented Programming in C++ by Robert Lafore - 4th Edition Chapter 3 Object Oriented Programming in C++ by Robert Lafore - 4th Edition Chapter 4 Object-Oriented Programming in C++ Fourth Edition Solution Manual ofstream OOP OOP Quiz oop1ch2e oop1ch3e output QTProgramming Recursion Simple C plus plus Programs solution Sorting Strings Temperature 5 Scale Converter Tools of the trade Urdu Training Videos