February 1, 2012
Variables. Data Types.
We can define a variable as a portion of memory to store a determined value.
Submitted by
Comments
Comments are parts of the source code disregarded by the compiler. They simply do nothing.
All in just one line and this would have had exactly the same meaning as the previous code.
In C++, the separation between statements is specified with an ending semicolon (;) at the end of each on
// my first program in C++
#include using namespace std;
int main () { cout << "Hello World!"; return 0; }
#include #include
using namespace std;
int main(int argc, char* argv[]) { long max = 0; long sum = 0;
cout<<"Enter Maximum No:"; cin>>max;
#include
class Animal { public: Animal():itsAge(1) { std::cout << "Animal constructor...\n"; } virtual ~Animal() { std::cout << "Animal destructor...\n"; } Animal
DiamondOfNumbers
#include using namespace std; #include #include
int main() { float a,b,c,d,e,f,g,h,i,j,n,sum,sub,mul,div; cout<<"enter a value for a = "; cin>>a; cout<<"enter a
// Tic-Tac-Toe // Plays the game of tic-tac-toe against a human opponent #include #include #include #include using namespace std; // global constants c