Search
 
SCRIPT & CODE EXAMPLE
 

CPP

pointer in cpp details

#include <iostream>
using namespace std;
class Demo {
private:
  int num;
  char ch;
public:
  void setMyValues(int num, char ch){
    this->num =num;
    this->ch=ch;
  }
  void displayMyValues(){
    cout<<num<<endl;
    cout<<ch;
  }
};
int main(){
  Demo obj;
  obj.setMyValues(100, 'A');
  obj.displayMyValues();
  return 0;
}
Comment

pointers in cpp

int *ip; // pointer to an integer
double *dp; // pointer to a double
float *fp; // pointer to a float
char *ch // pointer to character
Comment

PREVIOUS NEXT
Code Example
Cpp :: Access Elements in C++ Array 
Cpp :: windows servis from console app 
Cpp :: c++ to mips converter online 
Cpp :: input time from console C++ 
Cpp :: jquery datepicker default date not working 
Cpp :: . Shell sort in c++ 
Cpp :: decemal representation 
Cpp :: Types of Triangles Based on Angles in c++ 
Cpp :: permutation in c++ with backtracking 
Cpp :: grepper users assemble 
Cpp :: sideways triangle c++ xy plane 
Cpp :: Operatore ternario c++ 
Cpp :: delete item from linked list in c++ 
Cpp :: lru cache gfg 
Cpp :: stack algorithm in c++ 
Cpp :: Edmonds-Karp algorithm C++ 
Cpp :: map::begin 
Cpp :: assign array to array 
Cpp :: http://nv-study.ru/http://nv-study.ru/http://nv-study.ru/ 
Cpp :: i++ and++i 
Cpp :: c++ cyclic barrier 
Cpp :: pros millis() 
Cpp :: initialise a vector c++ 
Cpp :: sort array using stl 
Cpp :: 378. Kth Smallest Element in a Sorted Matrix using binary search 
Cpp :: How to write string in lpcstr in c++ 
Cpp :: void linux java 
Cpp :: def minimulHeaviestSetA(arr,n) 
Cpp :: how to find second smallest element using single loop 
Cpp :: how to use comparitor in priority queu in c++ 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =