1. Dev C 2b 2b Commands List Command
  2. Dev C 2b 2b Commands List Download
< cpp
C++

Summary of basic C-commands Compiling To compile a C-program, you can use either gor c. G -oexecutable filename.out sourcefilename.cc c -oexecutable filename.out sourcefilename.cc e.g. G -o Csampleinout.out Csampleinout.cc For the following commands you can find at the end of this summary sample programs. This process is relatively easy as long as you know what Dev-C requires to do this. In this page you will be given instructions using the Project menu choice. In another handout you will be given instructions on how to manually compile, link and execute C files at the command prompt of a command window. Step 1: Configure Dev-C. Dev-Pascal is a full-featured integrated development environment (IDE) to develop Windows or console-based Pascal applications using the Free Pascal or GNU Pascal compilers. Latest version: 1.9.2 License: Open Source - GNU GPL v2 For Windows 95, 98, NT, 2000, XP. C I/O occurs in streams, which are sequences of bytes. If bytes flow from a device like a keyboard, a disk drive, or a network connection etc. To main memory, this is called input operation and if bytes flow from main memory to a device like a display screen, a printer, a disk drive, or a network connection, etc., this is called output.

Language
Standard Library Headers
Freestanding and hosted implementations
Named requirements
Language support library
Concepts library(C++20)
Diagnostics library
Utilities library
Strings library
Containers library
Iterators library
Ranges library(C++20)
Algorithms library
Numerics library
Localizations library
Input/output library
Filesystem library(C++17)
Regular expressions library(C++11)
Atomic operations library(C++11)
Thread support library(C++11)
Technical Specifications
C++ language
General topics
Keywords
Escape sequences
Flow control
Conditional execution statements
Iteration statements (loops)
while
do-while
Jump statements
goto - return
Functions
Function declaration
Lambda function declaration
inline specifier
Exception specifications(until C++20)
noexcept specifier(C++11)
Exceptions
Namespaces
Types
Fundamental types
Enumeration types
Function types
Specifiers
decltype(C++11)
auto(C++11)
alignas(C++11)
Storage duration specifiers
Initialization
Default initialization
Value initialization
Zero initialization
Copy initialization
Direct initialization
Aggregate initialization
List initialization(C++11)
Constant initialization
Reference initialization
Expressions
Operators
Operator precedence
Alternative representations
Literals
Boolean - Integer - Floating-point
Character - String - nullptr(C++11)
User-defined(C++11)
Utilities
Attributes(C++11)
Types
typedef declaration
Type alias declaration(C++11)
Casts
Implicit conversions - Explicit conversions
static_cast - dynamic_cast
const_cast - reinterpret_cast
Memory allocation
Classes
Access specifiers
friend specifier
Class-specific function properties
Virtual function
override specifier(C++11)
final specifier(C++11)
Special member functions
Default constructor
Copy constructor
Move constructor(C++11)
Copy assignment
Move assignment(C++11)
Destructor
Templates
Template specialization
Parameter packs(C++11)
Miscellaneous
Keywords
(C++11)
(C++11)
(C++20)
(C++11)
(C++11)
(C++20)
(C++20)
(C++11)
(C++20)
(C++20)
(C++20)
(C++20)
(C++11)
(C++11)
(C++11)
(C++20)
(C++11)
(C++11)

Identifiers with special meaning
(C++11)
(C++11)

This is a list of reserved keywords in C++. Since they are used by the language, these keywords are not available for re-definition or overloading.

A – C D – P R – Z

alignas(since C++11)
alignof(since C++11)
and
and_eq
asm
atomic_cancel(TM TS)
atomic_commit(TM TS)
atomic_noexcept(TM TS)
auto(1)
bitand
bitor
bool
break
case
catch
char
char8_t(since C++20)
char16_t(since C++11)
char32_t(since C++11)
class(1)
compl
concept(since C++20)
const
consteval(since C++20)
constexpr(since C++11)
constinit(since C++20)
const_cast
continue
co_await(since C++20)
co_return(since C++20)
co_yield(since C++20)

decltype(since C++11)
default(1)
delete(1)
do
double
dynamic_cast
else
enum
explicit
export(1)(3)
extern(1)
false
float
for
friend
goto
if
inline(1)
int
long
mutable(1)
namespace
new
noexcept(since C++11)
not
not_eq
nullptr(since C++11)
operator
or
or_eq
private
protected
public

reflexpr(reflection TS)
register(2)
reinterpret_cast
requires(since C++20)
return
short
signed
sizeof(1)
static
static_assert(since C++11)
static_cast
struct(1)
switch
synchronized(TM TS)
template
this
thread_local(since C++11)
throw
true
try
typedef
typeid
typename
union
unsigned
using(1)
virtual
void
volatile
wchar_t
while
xor
xor_eq

  • (1) — meaning changed or new meaning added in C++11.
  • (2) — meaning changed in C++17.
  • (3) — meaning changed in C++20.

Note that and, bitor, or, xor, compl, bitand, and_eq, or_eq, xor_eq, not, and not_eq (along with the digraphs <%, %>, <:, :>, %:, and %:%:) provide an alternative way to represent standard tokens.

In addition to keywords, there are identifiers with special meaning, which may be used as names of objects or functions, but have special meaning in certain contexts.

final(C++11)
override(C++11)
transaction_safe(TM TS)
transaction_safe_dynamic(TM TS)

Also, all identifiers that contain a double underscore __ in any position and each identifier that begins with an underscore followed by an uppercase letter is always reserved and all identifiers that begin with an underscore are reserved for use as names in the global namespace. See identifiers for more details.

The namespace std is used to place names of the standard C++ library. See Extending namespace std for the rules about adding names to it.

The name posix is reserved for a future top-level namespace. The behavior is undefined if a program declares or defines anything in that namespace.

(since C++11)

The following tokens are recognized by the preprocessor when in context of a preprocessor directive:

if
elif
else
endif

ifdef
ifndef
define
undef
/battlefield-1943-pc-download-4640/.

include
line
error
pragma

defined
__has_include(since C++17)
__has_cpp_attribute(since C++20)

export(C++20)
import(C++20)
module(C++20)

The following tokens are recognized by the preprocessoroutside the context of a preprocessor directive:

_Pragma(since C++11)

[edit]See also

C documentation for C keywords
Retrieved from 'https://en.cppreference.com/mwiki/index.php?title=cpp/keyword&oldid=125072'
  • C++ Basics
  • C++ Object Oriented
  • C++ Advanced
  • C++ Useful Resources
  • Selected Reading

The C++ standard libraries provide an extensive set of input/output capabilities which we will see in subsequent chapters. This chapter will discuss very basic and most common I/O operations required for C++ programming.

C++ I/O occurs in streams, which are sequences of bytes. If bytes flow from a device like a keyboard, a disk drive, or a network connection etc. to main memory, this is called input operation and if bytes flow from main memory to a device like a display screen, a printer, a disk drive, or a network connection, etc., this is called output operation.

I/O Library Header Files

There are following header files important to C++ programs −

Sr.NoHeader File & Function and Description
1

<iostream>

This file defines the cin, cout, cerr and clog objects, which correspond to the standard input stream, the standard output stream, the un-buffered standard error stream and the buffered standard error stream, respectively.

2

<iomanip>

This file declares services useful for performing formatted I/O with so-called parameterized stream manipulators, such as setw and setprecision.

3

<fstream>

This file declares services for user-controlled file processing. We will discuss about it in detail in File and Stream related chapter.

The Standard Output Stream (cout)

Dev C 2b 2b Commands List Command

The predefined object cout is an instance of ostream class. The cout object is said to be 'connected to' the standard output device, which usually is the display screen. The cout is used in conjunction with the stream insertion operator, which is written as << which are two less than signs as shown in the following example.

When the above code is compiled and executed, it produces the following result −

Dev C 2b 2b Commands List Download

The C++ compiler also determines the data type of variable to be output and selects the appropriate stream insertion operator to display the value. The << operator is overloaded to output data items of built-in types integer, float, double, strings and pointer values.

The insertion operator << may be used more than once in a single statement as shown above and endl is used to add a new-line at the end of the line.

The Standard Input Stream (cin)

The predefined object cin is an instance of istream class. The cin object is said to be attached to the standard input device, which usually is the keyboard. The cin is used in conjunction with the stream extraction operator, which is written as >> which are two greater than signs as shown in the following example.

When the above code is compiled and executed, it will prompt you to enter a name. You enter a value and then hit enter to see the following result −

Dev C%2b%2b Commands List

The C++ compiler also determines the data type of the entered value and selects the appropriate stream extraction operator to extract the value and store it in the given variables.

The stream extraction operator >> may be used more than once in a single statement. To request more than one datum you can use the following −

This will be equivalent to the following two statements −

The Standard Error Stream (cerr)

The predefined object cerr is an instance of ostream class. The cerr object is said to be attached to the standard error device, which is also a display screen but the object cerr is un-buffered and each stream insertion to cerr causes its output to appear immediately.

The cerr is also used in conjunction with the stream insertion operator as shown in the following example.

When the above code is compiled and executed, it produces the following result −

The Standard Log Stream (clog)

The predefined object clog is an instance of ostream class. The clog object is said to be attached to the standard error device, which is also a display screen but the object clog is buffered. This means that each insertion to clog could cause its output to be held in a buffer until the buffer is filled or until the buffer is flushed.

The clog is also used in conjunction with the stream insertion operator as shown in the following example.

When the above code is compiled and executed, it produces the following result −

You would not be able to see any difference in cout, cerr and clog with these small examples, but while writing and executing big programs the difference becomes obvious. So it is good practice to display error messages using cerr stream and while displaying other log messages then clog should be used.