Search
 
SCRIPT & CODE EXAMPLE
 

CPP

constant variable in c++ example

#include <iostream>
using namespace std;
 
// Driver Code
int main()
{
 
    // const int x;  CTE error
    // x = 9;   CTE error
    const int y = 10;
    cout << y;
 
    return 0;
}
Comment

constants in cpp

#define identifier value
Comment

c++ define constant

#include <iostream>
using namespace std;

#define PI 3.14159
#define NEWLINE '
'

int main ()
{
  double r=5.0;               // radius
  double circle;

  circle = 2 * PI * r;
  cout << circle;
  cout << NEWLINE;

}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Comment

PREVIOUS NEXT
Code Example
Cpp :: if statement in c++ 
Cpp :: c++ split string by sstream 
Cpp :: palindrome string 
Cpp :: template function in class c++ 
Cpp :: size of set c++ 
Cpp :: split string by delimiter cpp 
Cpp :: use of strtok 
Cpp :: C++ Counting 
Cpp :: declaring multiple variables in cpp 
Cpp :: cpp set time 
Cpp :: sinonimo de tratar 
Cpp :: tan ^-1 ti 83 
C :: pi in c language 
C :: terminal count files in directory 
C :: check dns server in linux 
C :: Invalid public key for CUDA apt repository 
C :: sdl draw Rectf 
C :: how to print int in c 
C :: first program in c 
C :: two bytes to int c 
C :: silicon valley 
C :: sdl2 c programming 
C :: get last char string c 
C :: arduino uno spi pins 
C :: PATH_MAX 
C :: input array elements in c 
C :: binary tree in c search 
C :: equal string c 
C :: c language string 
C :: identifiers in c 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =