Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
DSA
22.3k+ articles
C++
4k+ articles
C++ Programs
2.5k+ articles
C Language
1.8k+ articles
STL
1.2k+ articles
CPP Examples
700+ articles
CPP-Functions
600+ articles
CPP-Library
240+ articles
C++-Templates
23 articles
cpp-ratio
7 articles
cpp-template
39 posts
Popular Articles
Recent Articles
How to Create a Template Class in C++?
Last Updated: 07 February 2024
In C++, template classes are used to create generic classes that can work for different data types. In this article, we will learn how to cr
...read more
cpp-template
C++
C++ Programs
Picked
CPP-OOPs
CPP Examples
How to Check if a Template Class has the Given Member Function in C++?
Last Updated: 31 January 2024
In C++ programming, we often need to check if a template class contains a specific member function. In this article, we will discuss how to
...read more
cpp-template
C++
C++-Templates
C++ Programs
Picked
CPP Examples
Swap Two Numbers using Function in C++
Last Updated: 02 January 2024
Swapping numbers means exchanging the values of the two numbers with each other. For Example,Before Swapping:a = 10, b = 22;After swapping:a
...read more
cpp-template
C++
C++ Programs
Similar Topics
DSA
22.3k+ articles
C++
4k+ articles
C++ Programs
2.5k+ articles
C Language
1.8k+ articles
STL
1.2k+ articles
CPP Examples
700+ articles
CPP-Functions
600+ articles
CPP-Library
240+ articles
C++-Templates
23+ articles
cpp-ratio
7+ articles
Why can templates only be implemented in the header file?
Last Updated: 11 December 2023
Templates are a powerful feature in C++ that allows for the creation of generic functions and classes. They provide a way to write code that
...read more
GFacts
cpp-template
Templates
Picked
DSA
is_pointer Template in C++
Last Updated: 19 November 2018
The std::is_pointer template of C++ STL is used to check whether the given type is pointer or not. It returns a boolean value showing the sa
...read more
cpp-pointer
cpp-template
C++
is_arithmetic Template in C++
Last Updated: 19 November 2018
The std::is_arithmetic templateof C++ STL is used to check whether the given type is arithmetic or not. An Arithmetic type means an integral
...read more
cpp-template
C++
std::is_enum Template in C++
Last Updated: 19 November 2018
The std::is_enum template of C++ STL is used to check whether the given type is enum or not. It returns a boolean value showing the same.Syn
...read more
STL
cpp-template
C++
C++-Templates
std::is_integral template in C++
Last Updated: 19 November 2018
The std::is_integral template of C++ STL is used to check whether the given type is integral or not. It returns a boolean value showing the
...read more
STL
cpp-template
C++
sqrt() function for complex number in C++
Last Updated: 17 August 2022
The complex version of sqrt() function is defined in the complex header file. This function is used to calculate the square root of the comp
...read more
CPP-Functions
cpp-template
C++
C++ Programs
Modulus function in C++ STL
Last Updated: 14 September 2018
Modulus function is used to return the value of the modulus between its two arguments. It works same as modulus operator works.template str
...read more
STL
CPP-Functions
cpp-template
C++
negate function in C++ STL
Last Updated: 18 July 2018
This function is used to negate the given values i.e. to change the sign of the values. It changes the positive values to negative and vice-
...read more
STL
CPP-Functions
cpp-template
C++
Program for sorting variables of any data type
Last Updated: 03 January 2024
Write a program for sorting variables of any datatype without the use of std::sort . Examples:Input : 2000, 456, -10, 0Output : -10 0 4
...read more
Sorting
cpp-template
DSA
Variadic function templates in C++
Last Updated: 25 November 2021
Variadic templates are class or function templates, that can take any variable(zero or more) number of arguments. In C++, templates can have
...read more
cpp-template
C++
Templates in C++
Last Updated: 23 April 2025
C++ template is a powerful tool that allows you to write a generic code that can work with any data type. The idea is to simply pass the dat
...read more
cpp-template
C++
Template Specialization in C++
Last Updated: 26 August 2022
Template in C++is a feature. We write code once and use it for any data type including user defined data types. For example, sort() can be w
...read more
cpp-template
C Language
C++
1
2
3
>>
Last
1
2
3
>>
Last
1
2
3
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !