Skip to content

Instantly share code, notes, and snippets.

@sms420
sms420 / gist:136862
Created June 27, 2009 02:04
clock for Kyle and Harvard Scientists
//reallySimpleClock.cpp
//for KT_Monda
#include <conio.h>
#include <iostream>
#include<fstream>
#include <ctime>
using namespace std;
int main()
/* doSomethingWhenYouFindaCSV.cpp
reads from, line by line, a text file: INPUT.txt
adds a newline when it encounters a comma
writes to, line by line, a text file: OUTPUT.txt
*********************************************************/
#include<iostream>
#include<string.h>
/* input_temp_output.cpp
reads from, line by line, an input text file
writes to temp the reads from temp and writes to out
*********************************************************/
#include<iostream>
/* fedexAPP.cpp
*********************************************************/
#include<iostream>
#include<string.h>
#include<fstream>
using namespace std;
int main () {
@sms420
sms420 / gist:139280
Created July 2, 2009 05:28
//re-name-file-usr-input.cpp
We couldn’t find that file to show.
@sms420
sms420 / re-name-file-usr-input.cpp
Created July 2, 2009 05:33
re-name-file-usr-input.cpp
//re-name-file-usr-input.cpp
#include<iostream>
#include<fstream>
#include<string.h>
using namespace std;
int main()
{
@sms420
sms420 / gist:139296
Created July 2, 2009 06:39
reanme a file from use iinput
//re-name-file-usr-input.cpp
#include<iostream>
#include<fstream>
#include<cstring>
using namespace std;
int main()
{
@sms420
sms420 / gist:139743
Created July 2, 2009 22:01
FINAL - clock for Kyle and harvard
//reallySimpleClock.cpp
//for KT_Monda [FINAL]
#include<conio.h>
#include<iostream>
#include<fstream>
#include<ctime>
#include<windows.h>
using namespace std;
# read_write.rb
# reads from input file
# writes to output file
# printing line nums
counter = 1
outFile = File.new("output.txt", "w")
inFile = File.new("input.txt", "r")
while (line = inFile.gets)
outFile.puts "#{counter}: #{line}"
@sms420
sms420 / gist:173539
Created August 23, 2009 23:16
recursive function examples
// recursive function examples
#include<iostream>
using namespace std;
void printForward(int p) {
if (p==0)
return;
cout << p;
printForward(p-1);