Skip to content

Instantly share code, notes, and snippets.

View DreamVB's full-sized avatar
🏠
Working from home

Ben DreamVB

🏠
Working from home
View GitHub Profile
@DreamVB
DreamVB / main.cpp
Created July 31, 2016 19:35
Decimal To Binary, Binary To Decimal
/*
Decimal To Binary, Binary To Decimal By DreamVB
Version 1.0
Two functions to convert between decimal and binary
Please feel free to use as you like.
Feel free to update or fix an errors.
*/
@DreamVB
DreamVB / dos2unix.cpp
Created August 5, 2016 21:17
Convert dos line breaks to unix
/*
dos2unix By DreamVB
Version 1.0
Program to convert dos line endings to unix \n
Please feel free to to use as you like.
Please let me know if you found this code usfull e. dreamvb@outlook.com
*/
#include <stdio.h>
@DreamVB
DreamVB / unix2dos.cpp
Created August 5, 2016 21:18
Convert unix line breaks to DOS line breaks
/*
unix2dos By DreamVB
Version 1.0
Convert unix line breaks \r to dos \r\n
Please feel free to to use as you like.
Please let me know if you found this code usfull e. dreamvb@outlook.com
*/
#include <stdio.h>
@DreamVB
DreamVB / fcompare.cpp
Created August 11, 2016 21:28
Simple tool to compare the contents of two files.
/*
fCompare By DreamVB
Version 1.0
Tool to compare the contents of two files.
Please feel free to to use as you like.
Please let me know if you found this code usfull e. dreamvb@outlook.com
*/
#include <stdio.h>
@DreamVB
DreamVB / main.cpp
Created August 21, 2016 20:12
Get special folder locations
#include <iostream>
#include <ShlObj.h>
//Get Special Folders ~By DreammVB~
//Example of returning special folder locations.
using namespace std;
using std::cout;
using std::endl;
@DreamVB
DreamVB / main.cpp
Created August 22, 2016 20:50
Bubble sort algorithm to sort a array of words into acsending / desending order.
// Sort words assending or desending order.
// By DreamVB
#include <iostream>
using namespace std;
using std::cout;
using std::endl;
template <typename T>void BSortNames(T *item, int size, bool asending){
@DreamVB
DreamVB / main.cpp
Created September 4, 2016 17:49
Check if a word is Palindrome the word should read the same as backwaords or forwards.
// Check if a word is Palindrome
// The word sould read the same as backwaords or forwards.
// I used used code to lowercase string as to avoid captital letters.
//By DreamVB
#include <iostream>
#include <Windows.h>
using namespace std;
using std::cout;
@DreamVB
DreamVB / main.cpp
Created September 16, 2016 22:35
Backup Files and Folders
/*
bBackup folder copy
Version 4
By Ben a.k.a DreamVB
*/
#include <iostream>
#include <Windows.h>
#include <string>
#include <algorithm>
@DreamVB
DreamVB / rpn.cpp
Last active April 22, 2021 22:40
C++ Reverse Polish Notation calulator version 3.0
// Reverse Polish notation demo
// Basic calulator for RPN expressions.
// Allows calulation of doubles
// includes many math functions
// Allows simple variables using single letters A-Z
// Allows easy printing of results using print and cr for newlines
// By Ben a.k.a DreamVB (dreamvb@outlook.com) 22:23 18/04/2021
#define MAX_STACK 2048
#define PI 3.14159265359
//A small simple file crypting tool in C++
//By Ben Jones Hope you like it.
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
FILE *fin = NULL;
char *pws;