IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
C++
Search C++ Group:

Advanced
-Collapse +Expand C++ To/From
To/FromCODEGuides
-Collapse +Expand C++ Study Test
PRESTWOODCERTIFIED
-Collapse +Expand C++ Store
PRESTWOODSTORE
   ► KBProgrammingC++Standard C++   Print This     

C++ KB: Standard C++ Topic

This topic covers standard C++ information including its major generic versions such as C++98, C++03, and the upcoming C++0x (probably C++09).
Topics

39 Articles Found in the Standard C++ Topic  (or one of the sub-topics in bold above)

  KB Article    

Mike Prestwood
1. C++ Abstraction (=0 in a virtual method)

AbstractMemberFunction is a pure virtual function makes this class Abstract class indicated by the "=0"and NonAbstractMemberFunction1 is a virtual function.

Posted to KB Topic: C++ OOP
12 years ago, and updated 11 years ago
(12 Comments , last by emmaescorts. )

Code
Nothing New Since Your Last Visit
7590
Hits

C++

Mike Prestwood
2. C++ Assignment (=)

C++ uses = for it's assignment operator.

Posted to KB Topic: C++ Language Basics
12 years ago, and updated 12 years ago

Code
Nothing New Since Your Last Visit
5808
Hits

C++

Mike Prestwood
3. C++ Associative Array (map)

General Info: Associative Array

A set of unique keys linked to a set of values. Each unique key is associated with a value. Think of it as a two column table. MyArray['CA'] = 'California' MyArray['AR'] = 'Arizona'

Languages Focus: Associative Array

Associative arrays are also known as a dictionary or a hash table in other languages.

C++ Associative Array

Posted to KB Topic: C++ Language Details
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
7856
Hits

C++

Mike Prestwood
4. C++ Case Sensitivity (Yes)

C++ is case sensitive. In C and C++ commands and variable names are case sensitive.

Posted to KB Topic: C++ Language Basics
12 years ago, and updated 11 years ago
(1 Comments , last by Geould.m )

Code
Nothing New Since Your Last Visit
6848
Hits

C++

Mike Prestwood
5. C++ Class..Object (Yes)

Languages Focus: Class..Object

In short, a class is a data type, and an object is an instance of a class type. A class has methods (routines), properties (member variables), and a constructor. The current values of the properties is the current state of the object. The UML is one of the diagraming disciplines that allows you to document the various changing states of a series of objects.

C++ Class..Object

Posted to KB Topic: C++ OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
5621
Hits

C++

Mike Prestwood
6. C++ Code Blocks ({ })

For C++, Java, JavaScript, and PHP, I prefer to put the first { at the end of the first line of the code block as in the example above because I see more C++ formatted that way.

Posted to KB Topic: C++ Language Basics
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
5993
Hits

C++

Mike Prestwood
7. C++ Comments How do you comment code in C++?
17 years ago, and updated 12 years ago
(3 Comments , last by aadil.k )

FAQ
Nothing New Since Your Last Visit
11791
Hits

C++

Mike Prestwood
8. C++ Comments (// or /* ... */)

Commenting Code
C++ uses "//" for a single line comment and /* */ for a multiple line comment.

Posted to KB Topic: C++ Language Basics
12 years ago, and updated 11 years ago
(5 Comments , last by Apprais.p )

Code
Nothing New Since Your Last Visit
6295
Hits

C++

Mike Prestwood
9. C++ Comparison Operators (==, !=)

General Info: Round Floating Point Numbers

When comparing floating point numbers, make sure you round to an acceptable level of rounding for the type of application you are using.

Languages Focus: Comparison Operators

A comparison operator compares two values either literals as in "Hello" and 3 or variables as in X and Counter. Most languages use the same operators for comparing both numbers and strings. Perl, for example, uses separate sets of comparison operators for numbers and strings.

C++ Comparison Operators

Common comparison operators:

== equal
!= not equal
< less than
> greater than
<= less than or equal
>= greater than or equal

Posted to KB Topic: C++ Language Basics
11 years ago

Code
Nothing New Since Your Last Visit
8076
Hits

C++

Mike Prestwood
10. C++ Constants (const)

In standard C++, you use const and static const to declare constants.

Posted to KB Topic: C++ Language Basics
11 years ago, and updated 11 years ago
(1 Comments , last by PUNAM.y )

Code
Nothing New Since Your Last Visit
7046
Hits

C++

Mike Prestwood
11. C++ Constructors (Use Class name)

A member function with the same name as the class.

Posted to KB Topic: C++ OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit  
8019
Hits

C++

Mike Prestwood
12. C++ Custom Routines

C++ is a hybrid language and as such offers global functions and class methods. A function must come before it's usage or you can prototype the function.

Posted to KB Topic: C++ Language Basics
12 years ago, and updated 12 years ago
(1 Comments , last by Kondapalli.R )

Code

KB Post
Nothing New Since Your Last Visit
14112
Hits

C++

Mike Prestwood
13. C++ Deployment Overview

You can use any of the many free and commercially available installation packages.

In Visual Studio.Net, you can create a Setup and Deployment project by using any of the templates available on the New Project dialog (Other Project Types).

C++Builder 2007 and 2009 are bundled with InstallAware Express CodeGear Edition installer.

Posted to KB Topic: C++ Language Basics
11 years ago

Code
Nothing New Since Your Last Visit
6379
Hits

C++

Mike Prestwood
14. C++ Destructor (~ClassName)

A member function with the same name as the class prefixed with a ~ (tilde). C++ destructors are automatically called when an object goes out of scope, or when you delete a dynamically allocated object. Every class can have only one destructor.

Posted to KB Topic: C++ OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
6894
Hits

C++

Mike Prestwood
15. C++ Development Tools

Languages Focus: Development Tools

Primary development tool(s) used to develop and debug code.

C++ Development Tools

Many compilers and development tools are available. Common development tools include Microsoft Visual C++, CodeGear C++Builder, and Eclipse.

With Visual C++ you use Microsoft's C++ syntax variations based on standard C++ or Microsoft's new C++/CLI syntax standard.

With C++Builder, you code using standard C++ with early support for the upcoming C++0x standard and using the VCL/RTL libraries. The VCL/RTL libraries are in common with Delphi which is based on Object Pascal. Within a project, C++Builder can use both C++ units and Delphi units.

With most C++ tools, you can also use your favorite C and C++ libraries too.

Posted to KB Topic: C++ Language Basics
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
5864
Hits

C++

Mike Prestwood
16. C++ End of Statement (;)

C++ uses a semicolon ";" as an end of statement specifier and you can put multiple statements on a single line of code if you wish as well as split a single statement into two or more code lines.

Posted to KB Topic: C++ Language Basics
11 years ago, and updated 11 years ago
(1 Comments , last by Paul.G6 )

Code
Nothing New Since Your Last Visit
6455
Hits

C++

Mike Prestwood
17. C++ Exception Trapping (try/catch)

Languages Focus: Exception Trapping

A common usage of exception handling is to obtain and use resources in a "try-it" block, deal with any exceptions in an "exceptions" block, and release the resources in some kind of "final" block which executes whether or not any exceptions are trapped.

C++ Exception Trapping

12 years ago, and updated 12 years ago
(1 Comments , last by Alee.A )

Code
Nothing New Since Your Last Visit
6577
Hits

C++

Mike Prestwood
18. C++ File Extensions (.CPP and .H)

Important standard C++ file extensions:

  • .CPP = C++ Source file. Your startup source file will have a main() routine.
  • .C = C source file (sometimes used for C++ source files too).
  • .H = Header include file.

Some important Visual C++ file extensions:

Posted to KB Topic: C++ Language Basics
11 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
5890
Hits

C++

Mike Prestwood
19. C++ If Statement (if..else if..else)

Same as standard C.

Posted to KB Topic: C++ Language Basics
11 years ago
(7 Comments , last by sarah.r )

Code
Nothing New Since Your Last Visit
11111
Hits

C++

Mike Prestwood
20. C++ Inheritance (: public ParentClass)

In C++ you use the class keyword to signify a class and a colon followed by the parent class name for inheritance.

Posted to KB Topic: C++ OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
9198
Hits

C++

Mike Prestwood
21. C++ Inheritance-Multiple (Yes)

C++ supports both multiple implementation inheritance and multiple interface inheritance.

Posted to KB Topic: C++ OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
5850
Hits

C++

Mike Prestwood
22. C++ Inlining (inline)

Use the inline keyword to tell the compiler to inline a routine.

Posted to KB Topic: C++ Language Details
11 years ago
(1 Comments , last by alvitar )

Code
Nothing New Since Your Last Visit
10578
Hits

C++

Mike Prestwood
23. C++ Interfaces (No, but mimic it.)

You can mimic an interface by using a class that has only pure-virtual functions and no member variables.

Posted to KB Topic: C++ OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
7365
Hits

C++

Mike Prestwood
24. C++ Literals (quote)

Literals are quoted as in "Prestwood". If you need to embed a quote use a slash in front of the quote as in \"

Posted to KB Topic: C++ Language Basics
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
6987
Hits

C++

Mike Prestwood
25. C++ Logical Operators

C++ logical operators:

&& and, as in this and that
|| or, as in this or that
! Not, as in Not This
^ either or, as in this or that but not both

Posted to KB Topic: C++ Language Basics
11 years ago

Code
Nothing New Since Your Last Visit
7203
Hits

C++

Mike Prestwood
26. C++ Member Visibility

C++ implements class and member visibility specifiers traditionally. Note the colon at the end of each visibility specifier and the semi-colon at the end of the class (the end of the statement).

Posted to KB Topic: C++ OOP
11 years ago, and updated 11 years ago
(5 Comments , last by christine.s )

Code
Nothing New Since Your Last Visit
7367
Hits

C++

Mike Prestwood
27. C++ Overloading

C++ Overloading

  • Operator - Yes for C++, no for C. Almost all operators can be overloaded for user-defined types
  • Method -
Posted to KB Topic: C++ Language Details
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
6368
Hits

C++

Mike Prestwood
28. C++ Overview and History

Language Overview: C++ is a hybrid traditional C and OOP language. You code either in a traditional approach using functions, procedures, and global data, or you code using an OOP approach, or a mixture of both.

Target Platforms: C++ is suitable for creating any type of native code applications for many different platforms. The focus of this information is on creating native code Win32 applications that run on Microsoft Windows.

Posted to KB Topic: C++ Language Basics
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
6368
Hits

C++

Mike Prestwood
29. C++ Pointers

C++ uses both pointers and references. Use the * operator to declare a pointer and use the & operator to declare a reference.

Posted to KB Topic: C++ Language Details
11 years ago

Code
Nothing New Since Your Last Visit
7782
Hits

C++

Mike Prestwood
30. C++ Prevent Derivation

Make the constructor a private member of the class.

Posted to KB Topic: C++ OOP
12 years ago, and updated 11 years ago
(1 Comments , last by PUNAM.y )

Code
Nothing New Since Your Last Visit
5819
Hits

C++

Mike Prestwood
31. C++ Report Tools Overview

Use any report writer you are comfortable with. C++Builder 2009 comes bundled with Rave Reports and Crystal Reports remains popular for Visual C++.

11 years ago
(1 Comments , last by Alee.A )

Code
Nothing New Since Your Last Visit
7914
Hits

C++

Mike Prestwood
32. C++ Static Members (static)

C++ supports static methods and static member fields using the static keyword.

Posted to KB Topic: C++ OOP
11 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
8107
Hits

C++

Mike Prestwood
33. C++ String Concatenation (+ or append)

The + operator can be used with any combination of C++ strings, C strings and characters.

Posted to KB Topic: C++ Language Basics
11 years ago

Code
Nothing New Since Your Last Visit
6401
Hits

C++

Mike Prestwood
34. C++ Unary Operators

An operation with only one operand (a single input) such as ++X and --Y.

Posted to KB Topic: C++ Language Basics
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
7455
Hits

C++

Mike Prestwood
35. C++ Variables (int x=0;)

Variable names are case sensitive. The fundamental variable types in C++ are char, short int, int, long int, bool, float, double, long double, and wchar_t. The integer data types char, short, long and int can be either signed or unsigned. Signed variables are positive and negative. Unsigned variables are positive only.

Posted to KB Topic: C++ Language Basics
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
6999
Hits

C++

Mike Prestwood
36. C++/CLI Code Blocks ({ })

Same as standard C++. For C++, Java, JavaScript, and PHP, I prefer to put the first { at the end of the first line of the code block as in the example above because I see more C++ formatted that way.

Posted to KB Topic: C++ Language Basics
11 years ago

Code
Nothing New Since Your Last Visit
5973
Hits

C++

Mike Prestwood
37. C++/CLI File Extensions (.CPP and .H)

The C++/CLI standard file extensions are the same as standard C++. Important C++ file extensions:

  • .CPP = C++ Source file. Your startup source file will have a main() routine.
  • .C = C source file (sometimes used for C++ source files too).
  • .H = Header include file.

Some important Visual C++ file extensions:

Posted to KB Topic: C++ Language Basics
11 years ago

Code
Nothing New Since Your Last Visit
6357
Hits

C++

Evan Egalite
38. C++: The Standard Template Library Generic Algorithms This article by Evan Egalite was first published in the August 2002 Prestwood eMagazine.
18 years ago, and updated 12 years ago

Article
Nothing New Since Your Last Visit
11119
Hits

C++

Mike Prestwood
39. Using cin and cout Using cin and cout in C++ to output values.
17 years ago, and updated 12 years ago

KB Post
Nothing New Since Your Last Visit
12463
Hits

C++

Icon Legend:
Since your last logged visit:
- New to you or updated since your last visit (sign in now to activate).
- NOT new to you since your last visit (sign in now to activate).

New C++ Knowledge Base Post...

Share your knowledge with the WORLD! In addition to adding comments to existing posts, you can post knowledge you've acquired. We welcome full articles (intro with screen shots), general posts (shorter), and tidbits (tips, FAQs, definitions, etc.).

Post New...

Tidbit Post: Short Flashcard FAQ Definition Quick Tip Code Snippet
Longer Post: Full Article General Post File Link Error News
Other: Blog Topic
Or, if YOU have a question...
  C++ Message Board
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2020 Prestwood IT Solutions.   [Security & Privacy]