//File:  a.h"
#ifndef _A_H_
#define _A_H_

#include <iostream>
namespace A {
  using namespace std;
  void f() { cout << "f z klasy A\n"; }
  void g() { cout << "g z klasy A\n"; }
}
#endif

//Plik:  new-a.h
#ifndef NEW_A_H_
#define NEW_A_H_
#include <iostream>

namespace A {
  //void k() { h(); }                      /* Błąd! */
  //void g() { cout << "Redefinicja g()/n"; } /* Błąd! */
  void h() { 
    cout << "h z klasy newA\n";
    g();
  }
}
#endif

File: opendemo.cpp
#include "a.h"
#include "new-a.h"

int main() {
  using namespace A;
  f();
  h();
}

/*Uruchom

openspace> ./a.out
f z klasy A
h z klasy newA
g z klasy A
openspace>

*/
