Skip to content
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

Added Back-To-Top Button on All Pages. #524

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions blog/2021-08-01-mdx-blog-post.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ authors: [shubhadip]
tags: [cpp]
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).

:::tip
Expand All @@ -18,3 +20,5 @@ Use the power of React to create interactive blog posts.
<button onClick={() => alert('button clicked!')}>Click me!</button>

:::

<BackToTop />
4 changes: 4 additions & 0 deletions blog/2024-06-25-STL-inportant-questions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ authors: [shubhadip]
tags: [cpp, programming]
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).

:::tip
Expand All @@ -18,3 +20,5 @@ Use the power of React to create interactive blog posts.
<button onClick={() => alert('button clicked!')}>Click me!</button>

:::

<BackToTop />
2 changes: 2 additions & 0 deletions docs/day-01/getting-started-with-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sidebar_label: "Getting Started with C++"
slug: getting-started-with-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';
import CustomTag from '@site/src/components/TagsComponents/CustomTag';

C++ is a general-purpose programming language and is widely used nowadays for competitive programming. It has imperative, object-oriented, and generic programming features.
Expand Down Expand Up @@ -57,3 +58,4 @@ Write your C++ code in a .cpp file.
- Run your compiled program: ./my_program1.


<BackToTop />
4 changes: 4 additions & 0 deletions docs/day-01/history-of-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ sidebar_label: "History of C++"
slug: /history-of-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

## History of CPP

C++ has a rich history that began in the late 1970s and has evolved significantly since then. Here's a timeline of its key milestones:
Expand Down Expand Up @@ -102,3 +104,5 @@ C++ is a vast language with numerous possibilities. Enjoy your journey in master
---

Feel free to expand upon this content and include more details, examples, or exercises based on your audience's needs and the depth of the tutorial you're planning to create.

<BackToTop />
3 changes: 3 additions & 0 deletions docs/day-01/introduction-to-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sidebar_label: "Introduction to C++"
slug: introduction-to-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';
import CustomTag from '@site/src/components/TagsComponents/CustomTag';

## Introduction to C++
Expand Down Expand Up @@ -72,3 +73,5 @@ C++ is a vast language with numerous possibilities. Enjoy your journey in master
---

Feel free to expand upon this content and include more details, examples, or exercises based on your audience's needs and the depth of the tutorial you're planning to create.

<BackToTop />
6 changes: 4 additions & 2 deletions docs/day-02/comments-in-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_label: "Comment"
slug: comment-in-cpp
---


import BackToTop from '@site/src/components/BackToTop/BackToTop';

## 1. What is Comment in C++?
- A comment in C++ is a programmer-readable note that is inserted directly into the source code of a program.
Expand Down Expand Up @@ -74,4 +74,6 @@ int calculateArea(int length, int width) {
}
```

By effectively using comments, you can improve the understandability and maintainability of your C++ programs, both for yourself and others who may read your code in the future.
By effectively using comments, you can improve the understandability and maintainability of your C++ programs, both for yourself and others who may read your code in the future.

<BackToTop />
6 changes: 5 additions & 1 deletion docs/day-02/first-cpp-program.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ sidebar_label: "First C++ Program"
slug: first-cpp-program
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

## Your First Steps in C++: Hello, World!

Welcome to the exciting world of C++ programming! Today, we'll embark on a journey together, crafting our very first C++ program - the classic "Hello, World!". This simple program lays the foundation for understanding core C++ concepts.
Expand Down Expand Up @@ -107,4 +109,6 @@ int main() {
```


Remember, this is a basic structure, and more complex programs may involve additional elements like classes, objects, and header files for custom functions.
Remember, this is a basic structure, and more complex programs may involve additional elements like classes, objects, and header files for custom functions.

<BackToTop />
5 changes: 4 additions & 1 deletion docs/day-02/keywords-identifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sidebar_label: "Keywords and Identifiers"
slug: keywords-and-identifiers-in-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

### 1. What is Keywords and Identifiers in C++?

Expand Down Expand Up @@ -120,4 +121,6 @@ Remember these rules when defining identifiers:
- Keywords cannot be used as identifiers.On the other hand, identifiers used for variables , functions , classes , etc.
- Keywords have fixed set, lowercase only but , identifiers defined by programmer , case sensitive.
- Examples of keyword: `int`,`if`,`while`,`class`.
- Examples of identifier: `age`,`calculateArea`,`myObject`.
- Examples of identifier: `age`,`calculateArea`,`myObject`.

<BackToTop />
5 changes: 4 additions & 1 deletion docs/day-02/new-line-in-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sidebar_label: "New Line in C++"
slug: adding-new-line-in-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

# Adding New Line in C++
There are two common ways to add a new line in C++: using `"\n"` and `"std::endl"`.
Expand Down Expand Up @@ -68,4 +69,6 @@ In terms of performance, `\n` is generally faster than `std::endl`.

Understanding the differences between `std::endl` and `\n` helps in choosing the appropriate method based on the requirements of your program.

Feel free to use either method based on your specific needs!
Feel free to use either method based on your specific needs!

<BackToTop />
2 changes: 2 additions & 0 deletions docs/day-03/cpp-type-modifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sidebar_label: "Type Modifiers"
slug: type-modifiers-in-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

### 1. What is Type Modifiers in C++?
Type modifiers in C++ are keywords that you use to alter the meaning of the basic data types to fit specific needs of your program. They allow you to specify more precisely the properties of variables, such as their size and whether they can hold negative values. The primary type modifiers in C++ are `short`, `long`, `signed`, and `unsigned`.
Expand Down Expand Up @@ -93,3 +94,4 @@ Example:
long double c = 0.333333333333333333L; // Large floating-point number
```

<BackToTop />
4 changes: 4 additions & 0 deletions docs/day-03/datatypes-in-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ sidebar_label: "Datatypes"
slug: data-types-in-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

### 1. What is Data Types in C++?
All variables use data type during declaration to restrict the type of data to be stored. Therefore, we can say that data types are used to tell the variables the type of data they can store. Whenever a variable is defined in C++, the compiler allocates some memory for that variable based on the data type with which it is declared. Every data type requires a different amount of memory.
#### C++ supports the following data types:
Expand Down Expand Up @@ -130,3 +132,5 @@ Example:
int original = 100;
int& ref = original;
```

<BackToTop />
4 changes: 2 additions & 2 deletions docs/day-03/variables-literals-constant-in-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_label: "Variables, Literals, and Constants"
slug: variables-literals-constant-in-cpp
---


import BackToTop from '@site/src/components/BackToTop/BackToTop';

### 1. What is Variables, Literals, and Constants in C++?
#### Variables
Expand Down Expand Up @@ -221,4 +221,4 @@ Example:
nullptr (represents a null pointer)
```


<BackToTop />
3 changes: 3 additions & 0 deletions docs/day-04/constants-in-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ sidebar_label: "Constants"
slug: constants-in-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

## What is Constants in C++?
Constants in C++ are fixed values that cannot be altered during the execution of a program. They are used to define values that should remain unchanged throughout the program, providing a way to ensure data integrity and improving code readability.

Expand Down Expand Up @@ -87,3 +89,4 @@ int main() {
}
```

<BackToTop />
4 changes: 4 additions & 0 deletions docs/day-04/input-output-in-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ sidebar_label: "Input and Output"
slug: input-output-in-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

## What is Input and Output in C++?

Input and Output (I/O) in C++ refer to the process of communicating with the user or other parts of the program. Input typically involves receiving data from an external source, such as the user via keyboard, or from a file. Output involves displaying information to the user, writing data to files, or sending data to other devices.
Expand Down Expand Up @@ -65,3 +67,5 @@ int main() {
return 0;
}
```

<BackToTop />
4 changes: 4 additions & 0 deletions docs/day-04/operators-in-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ sidebar_label: "Operators"
slug: operators-in-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

## 1. What is Operators in C++?

In programming, an operator is a symbol that operates on a value or a variable. Operators are essential building blocks in C++, allowing you to perform various operations on data, such as arithmetic calculations, comparisons, and logical operations.---
Expand Down Expand Up @@ -360,3 +362,5 @@ When overloading operators, there are several rules to keep in mind:
2. **Return Types**: The return type should be appropriate for the operation. For example, `operator+` should return a new object, while `operator+=` should return a reference to `*this`.
3. **Symmetry**: Ensure symmetric behavior where applicable. For example, `a == b` should return the same result as `b == a`.
4. **Do Not Overload Operators Irrelevantly**: Only overload operators that make sense for your class. For example, overloading the arithmetic operators for a class that represents a complex number makes sense, but overloading them for a class that represents a database connection does not.

<BackToTop />
7 changes: 6 additions & 1 deletion docs/day-05/Logical Operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ description: "In this tutorial, we will learn about Logical Operators in C++ pro
sidebar_label: "Logical Operators"
slug: Logical-Operators-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

# Logical Operators in C++

This repository provides an explanation of logical operators in C++, along with examples of their usage.
Expand Down Expand Up @@ -50,4 +53,6 @@ result = (a || b); // result will be true

// Using NOT operator
result = !a; // result will be false
```
```

<BackToTop />
4 changes: 4 additions & 0 deletions docs/day-05/arithmetic-Operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ sidebar_label: "Arithmetic Operators"
slug: Arithmetic-Operators-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

# Arithmetic Operators in C++

Arithmetic operators in C++ are symbols used to perform mathematical operations on operands. These operators allow you to perform addition, subtraction, multiplication, division, and modulus operations.
Expand Down Expand Up @@ -65,3 +67,5 @@ int result = 10 % 3; // result will be 1

```
These operators can be used with variables, constants, or expressions. They follow the usual rules of precedence and associativity. Additionally, parentheses can be used to enforce a specific order of evaluation.

<BackToTop />
3 changes: 3 additions & 0 deletions docs/day-05/do-while-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sidebar_label: "While and Do-While Loop"
slug: while-and-do-while-loop-in-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

## while Loop

Expand Down Expand Up @@ -110,3 +111,5 @@ int main() {
return 0;
}
```

<BackToTop />
5 changes: 4 additions & 1 deletion docs/day-05/for-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sidebar_label: "For Loop"
slug: for-loop-in-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

# C++ For Loop

Expand Down Expand Up @@ -137,4 +138,6 @@ In this example:

- The product of i and j is printed, resulting in a multiplication table.

- Each row of the table is printed by the inner loop, and after the inner loop completes, a new line is started by the outer loop.
- Each row of the table is printed by the inner loop, and after the inner loop completes, a new line is started by the outer loop.

<BackToTop />
3 changes: 3 additions & 0 deletions docs/day-05/if-else-statement.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sidebar_label: "IF-ELSE Statement"
slug: if-else-statement-in-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

## 1. What is Control Statements in C++?
Control statements are the keywords and judgement makers of C++, which controls the run time process of a program. These statements enable the program to decide on a course of action, to compute repetitive tasks and to determine the program’s flow according to specific conditions that may have been defined in the statements. There are two primary types of control statements in C++:
Expand Down Expand Up @@ -132,3 +133,5 @@ int main(){
```
NOTE:
> In the above code "?" refers to if-statement and statement after the ":" is executed if the if-statement is `false`.

<BackToTop />
6 changes: 5 additions & 1 deletion docs/day-05/relational_operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ sidebar_label: "Relational Operators"
slug: Relational-Operators-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

# Relational Operators in C++

Relational operators in C++ are used to compare two values and determine the relationship between them. These operators return a boolean value of true or false based on whether the comparison is true or false. Here are the commonly used relational operators:
Expand Down Expand Up @@ -72,4 +74,6 @@ if (a <= b) {
// This block will be executed because a is less than or equal to b
}

```
```

<BackToTop />
7 changes: 6 additions & 1 deletion docs/day-06/If-statement.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ description: "In this tutorial, we will learn about the If Statements in C++ pro
sidebar_label: "If Statements in C++"
slug: If-Statements
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

# If Statements in C++

This repository provides an explanation of if statements in C++, along with examples of their usage.
Expand Down Expand Up @@ -76,4 +79,6 @@ if (mark >= 90) {
}

```
In this example, the program checks the value of `mark` against multiple conditions in a sequential manner. Once a condition is met, the corresponding block of code is executed, and the rest of the conditions are skipped.
In this example, the program checks the value of `mark` against multiple conditions in a sequential manner. Once a condition is met, the corresponding block of code is executed, and the rest of the conditions are skipped.

<BackToTop />
4 changes: 3 additions & 1 deletion docs/day-06/break-statement.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ sidebar_label: "Break Statement"
slug: break-statement-in-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

## What is the Break Statement in C++?
The break statement in C++ is a control statement used to exit prematurely from loops (like for, while, or do-while loops) and switch statements. When encountered, the break statement immediately terminates the loop it's contained within, regardless of the loop's normal exit conditions. This allows for an early exit based on certain conditions without executing the remaining code inside the loop.

Expand Down Expand Up @@ -69,4 +71,4 @@ int main() {

```


<BackToTop />
5 changes: 5 additions & 0 deletions docs/day-06/continue-statement.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ description: "In this tutorial, we will learn about the continue statement in C+
sidebar_label: "Continue Statement"
slug: continue-statement-in-cpp
---

import BackToTop from '@site/src/components/BackToTop/BackToTop';

## What is the Continue Statement in C++?
In C++, the continue statement is used within loops to skip the rest of the current iteration and proceed directly to the next iteration of the loop. It's often used to avoid executing certain code in a loop under certain conditions.

Expand Down Expand Up @@ -102,3 +105,5 @@ int main() {
}

```

<BackToTop />
Loading