C++

Main Contents

  • CLASS
  • Object Oriented
  • Virtual Functions
  • Exception Handling
  • Constructor and Destructor

 

pointer

A class is an expanded concept of a data structure.

reading/writing a text file ref

how to compile and execute in Terminal on Mac OS X and mingw(start .), etc

g++ -o nopen nopen.cpp

./nopen

ofstream

hello.cpp

#include <iostream>
using namespace std;

int main ()
{
  cout << "Hello World! ";
  cout << "I'm Yamamoto Lab.";
}

g++ hello.cpp -o hello

./hello

calc.cpp

#include <iostream>
using namespace std;

int main ()
{
  int a=5;            
  int b(4);    
  int c(3);   
  int ans;

  a = a + b;
  ans = a - c;
  cout << ans;

  return 0;
}

g++ calc.cpp -o calc

multi thread tutorial