I.T. Discussion Community!
-Collapse +Expand
C++
Search C++ Group:

Advanced
-Collapse +Expand C++ Group Home

WEEKLYLESSON
Week 49 Lesson◄╣

MY
GROUPSETTINGS
-Collapse +Expand C++ To/From
To/FromCODEGuides
-Collapse +Expand C++ Study Test
PRESTWOODCERTIFIED
-Collapse +Expand C++ Store
PRESTWOODSTORE
   ► All GroupsC++ Group   Print This    All Groups  

Weekly C++ Lesson

Week 49, Posted Monday 12/9/2019

Content changes every Monday @ 1AM!! Check back once per week. Learn! Review! Test Yourself!

Weekly C++ Lesson

[Print Lesson]

Week 49, Posted Monday 12/9/2019

Content changes every Monday @ 1AM!! Check back once per week. Learn! Review! Test Yourself!

FAQ of the Week
Question: How do you comment code in C++?

Answer:

Use two forward slashes to represent a single line comment:

// This is a C++ style single line comment.

You can also use multiple line comments:

/*
This is a mutliple line comment. This
syntax is borrowed from C.
*/
Tip of the Week
Tip:

In C and C++, it is better to only use unary operators for incrementing and decrementing variables because they produce fewer instructions and run faster.

Code Snippet of the Week
C++ Inheritance (: public ParentClass)

General Info: Inheritance

The concept of a class makes it possible to define subclasses that share some or all of the main class characteristics. This is called inheritance. Inheritance also allows you to reuse code more efficiently. In a class tree, inheritance is used to design classes vertically. (You can use Interfaces to design classes horizontally within a class tree.) With inheritance, you are defining an "is-a" relationship (i.e. a chow is-a dog). Analysts using UML call this generalization where you generalize specific classes into general parent classes.

C++ Inheritance

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

In the following example, a terminator T-600 is-an android. 

class Android {
};

class T-600: Public Android {
};
Definition of the Week
C Family Unary Operators:  An operation with only one operand (a single input) such as ++X and --Y.An operation with only one operand (a single input). The following are the C family unary operators:
Link of the Week
C++Builder Roadmap

Official Delphi and C++Builder Roadmap from Codegear.

File of the Week

None This Week

Lastest C++ Flashcard

Our flashcards are part of our library of tidbits.

Tidbits are FAQs, Definitions, Tips, and Code Snippets from our knowledge base.

C++/CLI Empty String Check (String.IsNullOrEmpty)

The .Net framework offers a static method in the string class: String.IsNullOrEmpty.

String^ s;
  
//s = ""; //Uncomment to test 2nd case.
  
if (String::IsNullOrEmpty(s))
{
  MessageBox::Show("empty string");
}
Posted By Mike Prestwood, Post #102043, KB Topic: C++

Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech