Search
 
SCRIPT & CODE EXAMPLE
 

CPP

include cpp

#include <iostream>
#include "foop.h"

int main(int argc, char *argv[])
{
int x=42;
std::cout << x <<std::endl;
std::cout << foo(x) << std::endl;
return 0;
}
Comment

c++ #include

//INCLUDING BUILT-IN LIBRARIES...
#include <iostream>
#include <stdlib.h>
//PRE-DEFINE CONSTANT VALUES...
#define MAXNUM -12    //defining an integer
#define PI 3.1415     //defining a float
#define END "

		Program has ended!!
"   //defining a string
//PRE-DEFINING CONSTANT OPERATIONS...
#define ADD(a, b, c) (a + b + c)    //Operation that will add its 3 parameters

using namespace std;

int main(){
    //using other definitions to check if the current device is Windows or UNIX
    #ifdef _WIN32  
        cout<<"Windows Operating System Detected"<<endl;
    #elif __unix__
        cout<<"UNIX Operating System Detected"<<endl;
    #else
        cout<<"Operating System could NOT be identified!"<<endl;
    #endif
    
    cout<<endl<<"Using pre-defined values and operations: "<<endl;
    cout<<" • MAXNUM: "<<MAXNUM<<endl;       //using pre-defined integer
    cout<<" • PI: "<<PI<<endl;               //using pre-defined float
    cout<<" • ADD(): "<<ADD(2,5,99.5)<<endl;   //using pre-defined function

    cout<<END;    //using pre-defined string
    return 0;
}
Comment

cpp #include "" <>

#include <iostream>  // Searches iostream in Standard C++ Header files but not in the Current file's folder
#include "myiostream.h" // Searcher myiostream.h in the Current file's folder and also the Standard Header files
Comment

PREVIOUS NEXT
Code Example
Cpp :: c++ check if debug or release visual studio 
Cpp :: vectors c++ 
Cpp :: how to use a non const function from a const function 
Cpp :: two elements with difference K in c++ 
Cpp :: c++ set swap 
Cpp :: how to make a square root function in c++ without stl 
Cpp :: convert all strings in vector to lowercase or uppercase c++ 
Cpp :: polymorphism in c++ 
Cpp :: how to have a queue as a parameter in c++ 
Cpp :: c++ constructor call superclass 
Cpp :: exponent of x using c c++ 
Cpp :: how to sort array in c++ 
Cpp :: int max in c++ 
Cpp :: one away coding question 
Cpp :: sum of first 100 natural numbers 
Cpp :: resharper fold statement 
Cpp :: min heap stl 
Cpp :: c++ comment out multiple lines 
Cpp :: c++ formatting 
Cpp :: variadic template in c++ 
Cpp :: c++ std map initializer list 
Cpp :: 2d array of zeros c++ 
Cpp :: string append at position c++ 
Cpp :: C++, binary search recursive 
Cpp :: c++ concatenate strings 
Cpp :: split text c++ 
Cpp :: c++ last element of vector 
Cpp :: auto in cpp 
Cpp :: cpp serial print override always in same place 
Cpp :: wgat is duble in c++ 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =