Skip to content

Instantly share code, notes, and snippets.

View zachwhaley's full-sized avatar
🐳
Hi!

Zachary Whaley zachwhaley

🐳
Hi!
View GitHub Profile
@zachwhaley
zachwhaley / Makefile
Last active December 24, 2023 01:48
Simple C++ Makefile
CXXFLAGS = -g -Wall -Werror -std=c++11
LDLIBS =
PRGM = project
SRCS := $(wildcard *.cpp)
OBJS := $(SRCS:.cpp=.o)
DEPS := $(OBJS:.o=.d)
.PHONY: all clean
@zachwhaley
zachwhaley / iglatinpay.cpp
Last active January 22, 2020 18:54
A C++ program to convert a sentence to Pig Latin
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
// is_vowel returns true if the given
// character is a vowel; false otherwise.
bool is_vowel(char c)
{
@zachwhaley
zachwhaley / strrev.c
Last active August 29, 2015 13:57
C program to reverse a string
#include <stdio.h>
#include <string.h>
void strrev(char *str)
{
char tmp, *end;
if (str) {
end = str + strlen(str) - 1;
while (str < end) {