Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualKhatharr

Posted 20 June 2012 - 01:56 PM

Why the hell are people so terrified of namespaces?

//SysLogger.h
namespace SysLogger {
  extern int loggedItems;
  int initialize(char* somedata, int someother);
  void logSomething(char* herpderp);
};

//SysLogger.cpp
#include "SysLogger.h"

int SysLogger::loggedItems = 0;
static int fd = -1;

static int miscHelperFunction() {
  return foo;
}

int SysLogger::initialize(char* somedata, int someother) {
  herpderpSystem = new Foo;
  fd = herpderpSystem->makeLogFile();
  return 4;
}

void SysLogger::logSomething(char* herpderp) {
  loggit(fd, herpderp);
  ++loggedItems;
}

#5Khatharr

Posted 20 June 2012 - 01:47 PM

Why the hell are people so terrified of namespaces?

//SysLogger.h
namespace SysLogger {
  extern int loggedItems;
  int initialize(char* somedata, int someother);
  void logSomething(char* herpderp);
};

//SysLogger.cpp
#include "SysLogger.h"

int SysLogger::loggedItems = 0;
static int fd = -1;

static int miscHelperFunction() {
  return foo;
}

int SysLogger::initialize(char* somedata, int someother) {
  herpderpSystem = new Foo;
  fd = herpderpSystem->makeLogFile();
  return 4;
}

void SysLogger::logSomething(char* herpderp) {
  loggit(fd, herpderp);
}

#4Khatharr

Posted 20 June 2012 - 01:47 PM

Why the hell are people so terrified of namespaces?

//SysLogger.h
namespace SysLogger {
  extern int loggedItems;
  int initialize(char* somedata, int someother);
  void logSomething(char* herpderp);
};

//SysLogger.cpp
#include "SysLogger.h"

int SysLogger::loggedItems = 0;
static int fd;

static int miscHelperFunction() {
  return foo;
}

int SysLogger::initialize(char* somedata, int someother) {
  herpderpSystem = new Foo;
  fd = herpderpSystem->makeLogFile();
  return 4;
}

void SysLogger::logSomething(char* herpderp) {
  loggit(fd, herpderp);
}

#3Khatharr

Posted 20 June 2012 - 01:45 PM

Why the hell are people so terrified of namespaces?

//SysLogger.h
namespace SysLogger {
  int initialize(char* somedata, int someother);
  void logSomething(char* herpderp);
};

//SysLogger.cpp
#include "SysLogger.h"
static int fd;
static int miscHelperFunction() {
  return foo;
}
int SysLogger::initialize(char* somedata, int someother) {
  herpderpSystem = new Foo;
  fd = herpderpSystem->makeLogFile();
  return 4;
}
void SysLogger::logSomething(char* herpderp) {
  loggit(fd, herpderp);
}

#2Khatharr

Posted 20 June 2012 - 01:45 PM

Why the hell are people so terrified of namespaces?

//SysLogger.h
namespace SysLogger {
  int initialize(char* somedata, int someother);
  void logSomething(char* herpderp);
};

//SysLogger.cpp
#include "SysLogger.h"
static int fd;
static int miscHelperFunction() {
  return foo;
}
int SysLogger::initialize(char* somedata, int someother) {
  herpderpSystem = new Foo;
  fd = herpderpSystem->makeLogFile();
  return 4;
}
void SysLogger::logSomething(char* herpderp) {
  loggit(herpderp);
}

#1Khatharr

Posted 20 June 2012 - 01:44 PM

Why the hell are people so terrified of namespaces?

//SysLogger.h
namespace SysLogger {
  int initialize(char* somedata, int someother);
  void logSomething(char* herpderp);
};

//SysLogger.cpp
#include "SysLogger.h"
static int fd;
static int miscHelperFunction() {
  return foo;
}
int SysLogger::initialize(char* somedata, int someother) {
  herpderpSystem = new Foo;
  herpderpSystem->tunrOn();
  return 4;
}
void SysLogger::logSomething(char* herpderp) {
  loggit(herpderp);
}

PARTNERS