Skip to content

Instantly share code, notes, and snippets.

View b166er-droid's full-sized avatar

b166er-droid

View GitHub Profile
@b166er-droid
b166er-droid / postfix_calc.c
Created April 28, 2020 23:14 — forked from cameronp98/postfix_calc.c
Simple postfix expression parser in C. Uses Reverse Polish Notation (RPN), i.e. 2 2 + 3 * => 12.0
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
typedef float st_type;
typedef struct {
st_type value;
struct node_t *next;
} node_t;
@b166er-droid
b166er-droid / rpn.cpp
Created April 28, 2020 23:14 — forked from DreamVB/rpn.cpp
C++ Reverse Polish Notation calulator
// Reverse Polish notation demo
// Basic calulator for RPN expression only + / * - is supported.
// Allows ints and floats.
// By DreamVB ([email protected]) 20:08 26/09/2016
#include <iostream>
//
using namespace std;
using std::cout;
//------------------------------------------------------------------------------
//
// Just a simple cheat sheet(program?) to help beginning programmers
// understand the following concepts
// - Passing an address to a pointer
// - Passing by reference
// - Passing by value
// - Scoping
//
// Joshua Sanders
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
void learnTypesAndSize() {
/** TYPES */
cout << "\n:::: TYPES ::::" << endl;
@b166er-droid
b166er-droid / main.cpp
Created April 24, 2020 06:21 — forked from TravisMullen/main.cpp
C++ Cheat Sheet by Example
// ---------- C++ Tutorial Example 1 ----------
// Source {@link http://www.newthinktank.com/2018/03/c-tutorial-26/}
/*
* Multi-line Comment
*/
// These are called preprocessor directives
// They load the files which contain premade functions
// for your use
@b166er-droid
b166er-droid / c++_cheat-sheet.md
Created April 24, 2020 06:10 — forked from rubienr/c++_cheat-sheet.md
C++ Cheat Sheet
/*
* =======================================
* C++ cheat sheet
* =======================================
* 01- string
* 02- vector
* 03- pair
* 04- set
* 05- map
*
@b166er-droid
b166er-droid / cheatsheet.cpp
Created April 24, 2020 06:09 — forked from satwikkansal/cheatsheet.cpp
C++ STL cheatsheet for competitive progrmming
/*
This a header file that includes every standard library.
You can use it to save time.
NOTE: This header file may not be recognized by compilers
other than gcc.
*/
#include <bits/stdc++.h>
/*
//Use this if the above header file doesn't work.