Contents of extern


Archived packages


Table of contents


Files

declarations.hpp

#ifndef DECLARATIONS_HPP_20040620T004442
#define DECLARATIONS_HPP_20040620T004442

extern int value;
void print_value ();

#endif

main.cpp

#include "declarations.hpp"

int main () {
  value = 12345678;
  print_value();
}

definitions.cpp

#include "declarations.hpp"
#include <iostream>

int value;
void print_value () { std::cout << value << '\n'; }