Skip to content

Instantly share code, notes, and snippets.

View phlandscape's full-sized avatar

phlandscape

  • Germany
View GitHub Profile
@phlandscape
phlandscape / main.cpp
Last active December 11, 2015 19:48
relearning Merge Sort by implementing a templated version for STL containers with iterators
/* Author: phlandscape
* relearning Merge Sort by implementing
* templated version for STL containers with iterators
*
*/
#include <iostream>
#include <list>
// template functions
template<typename container, typename ITERATOR_TYPE>
@phlandscape
phlandscape / main.cpp
Created September 14, 2012 20:41
this and what i wrote (@reddit)
#include <iostream>
using std::cout; using std::endl;
using std::copy;
template <typename T>
void Swap_Elements(T &a, T &b){
T temp(a); a = b; b = temp;
}
#include "Euro.h"
//constructor
Currency::Currency(string name):
value(0),
Inter_Name(name)
{
}
Currency::Currency(string name,double x):
@phlandscape
phlandscape / console output
Created August 16, 2012 12:05
C++ solution for /r/dailyprogrammer Challenge #85 Intermediate
:::::::::::::::::::/
:::::::::::::::::::/+
:::::::::::::::::::/++
####################+++
####################+++
####################+++
####################+++
####################+++
####################+++
####################+++
@phlandscape
phlandscape / AnalyzeMatrix.cpp
Created August 15, 2012 17:17
C++ Beginner Solution for /r/dailyprogrammer #85(Easy) by landscapez
#include "AnalyzeMatrix.h"
#include <iostream>
using namespace std;
AnalyzeMatrix::AnalyzeMatrix(fstream &fileInc)
{
if(fileInc.is_open()){
if(fileInc.good()){
vector <int> cols;
string edge;
while(getline(fileInc,edge)){