forked from Codecademy/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved empty.md into the correct file location as specified by issue C…
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
Title: 'empty' | ||
Description: 'Introduces the basic functionality and syntax of the C++ STL map class .empty() member function.' | ||
Subjects: | ||
- 'Computer Science' | ||
Tags: # Please only use Tags in the tags.md file (https://github.com/Codecademy/docs/blob/main/documentation/tags.md). If that list feels insufficient, feel free to create a new Tag and add it to tags.md in your PR! | ||
- 'C++' | ||
- 'Data Structures' | ||
- 'Documentation' | ||
- 'Functions' | ||
- 'Map' | ||
- 'Programming' | ||
CatalogContent: # Please use course/path landing page slugs, rather than linking to individual content items. If listing multiple items, please put the most relevant one first | ||
--- | ||
|
||
The C++ STL map class **.empty()** function is a member function of the STL map class. This function can be called on an STL map object, and returns true if the map object on which it is called is empty (e.g. contains no key-value pairs), and returns false if the map object contains one or more elements. | ||
|
||
## Syntax | ||
|
||
The map class .empty() member function can be called using the dot (.) operator, as shown below. The function takes no parameters, and the return value is either a boolean true value or a boolean false value, depending on whether the map object on which the function is called is or is not empty, respectively. | ||
|
||
|
||
[Text, code, images, parameters, etc. about the syntax] | ||
|
||
## Example | ||
|
||
[Text, code, images, etc. about example 1] | ||
|
||
## Codebyte Example (if applicable) | ||
|
||
We can currently support: | ||
|
||
- Python | ||
- JavaScript | ||
- Ruby | ||
- C++ | ||
- C# | ||
- Go | ||
- PHP | ||
|
||
See [content-standards.md](https://github.com/Codecademy/docs/blob/main/documentation/content-standards.md) for more details! | ||
|
||
```codebyte/cpp | ||
// Example runnable code block. | ||
#include <iostream> | ||
#include <map> | ||
#include <string> | ||
int main(){ | ||
map<int, string> mapObject | ||
return 0; | ||
} | ||
``` |