container class in c++
C++
// CPP program to illustrate
// concept of Containership
#include <iostream>
using namespace std;
class first {
public:
void showf()
{
cout << "Hello from first class\n";
}
};
// Container class
class second {
// creating object of first
first f;
public:
// constructor
second()
{
// calling function of first class
f.showf();
}
};
int main()
{
// creating object of second
second s;
}
Also in C++:
- Title
- bool function in c++
- Category
- C++
- Title
- range based for loop c++
- Category
- C++
- Title
- how to run c++ file mingw cmd
- Category
- C++
- Title
- in c, is class uppercase or lowercase
- Category
- C++
- Title
- c++ initialization list
- Category
- C++
- Title
- count function c++
- Category
- C++
- Title
- how to use wasd c++
- Category
- C++
- Title
- insertion sort in c++ program
- Category
- C++
- Title
- c++ map find
- Category
- C++
- Title
- nan c++ example
- Category
- C++
- Title
- COunt the number of continous subsequences such that the sum is between
- Category
- C++
- Title
- matrix transpose tiling
- Category
- C++
- Title
- basic ex of maps in c++
- Category
- C++
- Title
- how to pushback in vector
- Category
- C++
- Title
- how initilaize deffult value to c++ class
- Category
- C++
- Title
- least number of coins to form a sum
- Category
- C++
- Title
- c++ read file line by line
- Category
- C++
- Title
- system("pause") note working c++
- Category
- C++
- Title
- Create a program that finds the minimum value in these numbers
- Category
- C++
- Title
- log base e synthax c++
- Category
- C++
- Title
- fail() in c++
- Category
- C++
- Title
- cin.ignore
- Category
- C++
- Title
- c++ string
- Category
- C++
- Title
- cut by delimiter c++
- Category
- C++
- Title
- sort a pair using c++ stl
- Category
- C++
- Title
- simple timer arduino blynk library error
- Category
- C++
- Title
- c++ code for polynomial addition
- Category
- C++
- Title
- switch c++
- Category
- C++
- Title
- c++ sort
- Category
- C++
- Title
- how to concatinate two strings in c++
- Category
- C++
- Title
- c++ sort array of ints
- Category
- C++
- Title
- checking an int in c++
- Category
- C++
- Title
- exponenciacion binaria
- Category
- C++
- Title
- if vector contains value c++
- Category
- C++
- Title
- map arduino
- Category
- C++
- Title
- c++ function return pointer to itself
- Category
- C++
- Title
- what is time complexity of insertion sort
- Category
- C++
- Title
- c++ program for addition of two numbers using functions
- Category
- C++
- Title
- c++ allocate dynamic with initial values
- Category
- C++
- Title
- char **
- Category
- C++
- Title
- switch statement c++
- Category
- C++
- Title
- size of a matrix using vector c++
- Category
- C++
- Title
- c++ reading string
- Category
- C++
- Title
- stringstream in c++ with delimiter
- Category
- C++
- Title
- Qt asynchronous HTTP request
- Category
- C++
- Title
- error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if(s[i] != "b"){
- Category
- C++
- Title
- set of vectors c++
- Category
- C++
- Title
- hobo 8
- Category
- C++
- Title
- insert function in c++ vector
- Category
- C++
- Title
- memset c++
- Category
- C++
- Title
- recursion in cpp with reference
- Category
- C++
- Title
- elseif c++
- Category
- C++
- Title
- Find a element in a map C++
- Category
- C++
- Title
- c++ initialize a vector
- Category
- C++
- Title
- lisy stl C++
- Category
- C++
- Title
- c++ string^ to char*
- Category
- C++
- Title
- c++ overloaded == operator
- Category
- C++
- Title
- c++ char to int
- Category
- C++
- Title
- 2d vector
- Category
- C++
- Title
- initialising 2d vector
- Category
- C++
- Title
- C++ and endl
- Category
- C++
- Title
- convert int to binary string c++
- Category
- C++
- Title
- max heap c++ stl;
- Category
- C++
- Title
- c++ string contains
- Category
- C++
- Title
- preorder traversal c++
- Category
- C++
- Title
- c++ read matttrix from text file
- Category
- C++
- Title
- binary search stl in c++
- Category
- C++
- Title
- min in vector c++
- Category
- C++
- Title
- c++ program to find gcd of 3 numbers
- Category
- C++
- Title
- ceil in c++
- Category
- C++
- Title
- c++ ros subscriber
- Category
- C++
- Title
- passing a vector to a function c++
- Category
- C++
- Title
- restting a queue stl
- Category
- C++
- Title
- built in function in c++ for binary to decimal
- Category
- C++
- Title
- what are the different ways to traverse a binary tree
- Category
- C++
- Title
- string input
- Category
- C++
- Title
- c++ iterate over vector
- Category
- C++
- Title
- cpp loop through object
- Category
- C++
- Title
- gfg right view of tree
- Category
- C++
- Title
- double ended queue in c++ stl
- Category
- C++
- Title
- namespaces c++
- Category
- C++
- Title
- what is iterator in c++?
- Category
- C++
- Title
- time function c++
- Category
- C++
- Title
- adding element in vector c++
- Category
- C++
- Title
- how to extract substring from string in c++
- Category
- C++
- Title
- how to switch to another branch in git
- Category
- C++
- Title
- inserting an element in an set c++
- Category
- C++
- Title
- array sort c++
- Category
- C++
- Title
- properties of a set c++
- Category
- C++
- Title
- how to format decimal palces in c++
- Category
- C++
- Title
- stoi c++
- Category
- C++
- Title
- c++ file to string
- Category
- C++
- Title
- object reference not set to an instance of an object c#
- Category
- C++
- Title
- sort function in cpp
- Category
- C++
- Title
- new keyword in cpp
- Category
- C++
- Title
- how to iterate through a map in c++
- Category
- C++
- Title
- how to find the size of a character array in c++
- Category
- C++
- Title
- c++ main function
- Category
- C++
- Title
- c++ string to integer without stoi
- Category
- C++
- Title
- mao two drivers c++
- Category
- C++