C++ Cheat Sheet
Does anyone know a website that has a C++ cheat sheet on it?
Everyone should live a little. Even if they get killed in the process.------------------------------http://www.x-compgames.com
I mean like a table that says the command, then what it does.
Everyone should live a little. Even if they get killed in the process.------------------------------http://www.x-compgames.com
You can look anything up on msdn.microsoft.com. It contains all the SDK docs from Microsoft as well as standard C/C++ documentation, all for free! Check it out. Or, if you have Visual C++, it probably came with the "MSDN Library." This is the same thing as msdn.microsoft.com, except with better search features and an index, etc.
My Geekcode: "GCS d s: a14 C++$ P+(++) L+ E-- W+++$ K- w++(+++) O---- M-- Y-- PGP- t X
R- tv+ b++ DI+(+++) D- G e* h!"
Decode my geekcode!
Geekcode.com
Visit our web site:
Asylum Entertainment
My Geekcode: "GCS d s: a14 C++$ P+(++) L+ E-- W+++$ K- w++(+++) O---- M-- Y-- PGP- t X
R- tv+ b++ DI+(+++) D- G e* h!"
Decode my geekcode!
Geekcode.com
Visit our web site:
Asylum Entertainment
My Geekcode: "GCS d s: a14 C++$ P+(++) L+ E-- W+++$ K- w++(+++) O---- M-- Y-- PGP- t XR- tv+ b++ DI+(+++) D- G e* h!"Decode my geekcode!Geekcode.com
Visit our web site:Asylum Entertainment
Visit our web site:Asylum Entertainment
Or you can buy C/C++ Programmers Reference 2nd Edition...nice little reference to have around..details the syntax, functions, methods, covers the STL and the ANSI/ISO standard C and C++ including the new C99 standard. So if all you are looking for is a reference and like to have something on actual paper(like I do) its really handy and it only costs like 15 bucks at Borders.
OME
OME
As all programming languages, C++ itself of course doesn't offer any specialized functions like 'CreateAWindow()' or even 'DrawMy3DLandscape()', I hope you're not expecting this.
Unlike BASIC, C++ consists of many more things than just commands, like operators, blocks {}, datatypes as int; float etc. and such a list also won't help you much if you're just not fluid with the C++ features, well at least I think so...
If you like, here's a list of keywords in C++:
bool - data type; is true or false
break - leaves the current scope ({} block like used in while )
class - keyword for defining a custom data type with special abilities.
char - data type; unsigned 0 - 255, signed -128 - 127
continue - continues a loop before the closing } has been reached
default - used in switch if no case matches
delete - frees memory, for a class also calls the destructor
double - data type, decimal number with double precision
else - can be appended to if to add code for when the expression is false
enum - defines preprocessor constants with support for automatic enumeration
extern - used in variable declarations to access global variables in other files
float - data type; single precision decimal number
friend - used in a class to declare friends; see protected
for - counting loop
goto - jumps to a defined mark; usage is seen as bad coding style by most programmers
if - conditional execution
int - datatype; in 32 bits matches long.
long - datatype; unsigned to 2^32, signed -2^31 to 2^31-1, can extent double even more precision
new - allocates memory, for a class , also calls its constructor
private - used in a class , makes all following attributes and methods only usable for the classes methods.
protected - used in a class , makes all following attributes and methods only usable by the classes methods and friend s of the class.
public - used in a class , makes all following attributes and methods freely usable
return - return from function; can take a return-value
short - data type; unsigned 0 - 65535, signed -32768 - 32767
signed - makes char , int , long , short a signed data type, as is the default
sizeof - preprocessor command returning a variables or data type's size
struct - similar to class , allows grouping of variables; no ctor/dtor, all members are public
switch - similar to if allows to compare value against multiple possibilities
typedef - declares a new data typ; commonly used with struct
union - similar to struct , all grouped variables share the same memory
unsigned - makes char , int , long , short an unsigned data type
void - used to omit a functions return value and to declare datatypeless pointers
while - conditional loop
...this is far from complete and it's missing examples and syntactical descriptions. Perhaps anyone likes to continue the list, not me
There are still many preprocessor-specific things like #include, #pragma, #define, operators like += / %= || & *, and other things like (), {}, [], ... ...
-Markus-
Edited by - Cygon on December 6, 2000 7:55:46 PM
Unlike BASIC, C++ consists of many more things than just commands, like operators, blocks {}, datatypes as int; float etc. and such a list also won't help you much if you're just not fluid with the C++ features, well at least I think so...
If you like, here's a list of keywords in C++:
bool - data type; is true or false
break - leaves the current scope ({} block like used in while )
class - keyword for defining a custom data type with special abilities.
char - data type; unsigned 0 - 255, signed -128 - 127
continue - continues a loop before the closing } has been reached
default - used in switch if no case matches
delete - frees memory, for a class also calls the destructor
double - data type, decimal number with double precision
else - can be appended to if to add code for when the expression is false
enum - defines preprocessor constants with support for automatic enumeration
extern - used in variable declarations to access global variables in other files
float - data type; single precision decimal number
friend - used in a class to declare friends; see protected
for - counting loop
goto - jumps to a defined mark; usage is seen as bad coding style by most programmers
if - conditional execution
int - datatype; in 32 bits matches long.
long - datatype; unsigned to 2^32, signed -2^31 to 2^31-1, can extent double even more precision
new - allocates memory, for a class , also calls its constructor
private - used in a class , makes all following attributes and methods only usable for the classes methods.
protected - used in a class , makes all following attributes and methods only usable by the classes methods and friend s of the class.
public - used in a class , makes all following attributes and methods freely usable
return - return from function; can take a return-value
short - data type; unsigned 0 - 65535, signed -32768 - 32767
signed - makes char , int , long , short a signed data type, as is the default
sizeof - preprocessor command returning a variables or data type's size
struct - similar to class , allows grouping of variables; no ctor/dtor, all members are public
switch - similar to if allows to compare value against multiple possibilities
typedef - declares a new data typ; commonly used with struct
union - similar to struct , all grouped variables share the same memory
unsigned - makes char , int , long , short an unsigned data type
void - used to omit a functions return value and to declare datatypeless pointers
while - conditional loop
...this is far from complete and it's missing examples and syntactical descriptions. Perhaps anyone likes to continue the list, not me
There are still many preprocessor-specific things like #include, #pragma, #define, operators like += / %= || & *, and other things like (), {}, [], ... ...
-Markus-
Edited by - Cygon on December 6, 2000 7:55:46 PM
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.
Okay, I''ll visit MSDN after I post this.
Cygon, I know there is much more than commands, but I''m looking for something that includes it ALL.
Hopefully MSDN will.
Cygon, I know there is much more than commands, but I''m looking for something that includes it ALL.
Hopefully MSDN will.
Everyone should live a little. Even if they get killed in the process.------------------------------http://www.x-compgames.com
of course msdn will..so does the reference book i mentioned above..only draw back is that its on actual paper which is the reason i like, i look at my computer screen enough during the day as it is
OME
OME
There is no such thing as something that "includes it ALL"
There are many custom libraries, wrappers, header files with custom funtions, etc.
However, MSDN is a good place to look for as much as you can get =o)
(o= Cliff_Hawkens =o)
There are many custom libraries, wrappers, header files with custom funtions, etc.
However, MSDN is a good place to look for as much as you can get =o)
(o= Cliff_Hawkens =o)
[email=erydo@gdnmail.net" style="color: #ff0000; text-decoration:none; cursor:help;](o= erydo =o)[/email]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement