Skip to content

Add cpp mark to code #261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/cpp/reference-type-function-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ms.workload: ["cplusplus"]
# Reference-Type Function Arguments
It is often more efficient to pass references, rather than large objects, to functions. This allows the compiler to pass the address of the object while maintaining the syntax that would have been used to access the object. Consider the following example that uses the `Date` structure:

```
```cpp
// reference_type_function_arguments.cpp
struct Date
{
Expand Down Expand Up @@ -57,7 +57,7 @@ int main()

Although arguments passed as reference types observe the syntax of non-pointer types, they retain one important characteristic of pointer types: they are modifiable unless declared as **const**. Because the intent of the preceding code is not to modify the object `GDate`, a more appropriate function prototype is:

```
```cpp
long JulianFromGregorian( const Date& GDate );
```

Expand All @@ -66,4 +66,4 @@ long JulianFromGregorian( const Date& GDate );
Any function prototyped as taking a reference type can accept an object of the same type in its place because there is a standard conversion from *typename* to *typename***&**.

## See Also
[References](../cpp/references-cpp.md)
[References](../cpp/references-cpp.md)