Skip to content

Instantly share code, notes, and snippets.

@enile8
enile8 / gist:2424514
Created April 19, 2012 21:59
A small example program using SQLite with C++
// A small example program using SQLite with C++
#include <iostream>
#include <sqlite3.h>
using namespace std;
static int callback(void *NotUsed, int argc, char **argv, char **azColName)
{
int i;
for(i=0; i<argc; i++)
{
@enile8
enile8 / tempCon.cpp
Last active March 7, 2019 03:59
Simple C++ program to convert temperature from either Fahrenheit to Celsius or vise-versa.
/*******************************************************************
* C++ program to convert temperature from either Fahrenheit to *
* Celsius or vise-versa. *
* *
*******************************************************************/
#include <iostream>
#include <cctype>
using namespace std;
int main()
@enile8
enile8 / FizzBuzz.cc
Created January 5, 2012 03:58
FizzBuzz in C++
#include <iostream>
using namespace std;
int main(){
int i;
for (i = 0; i < 100; i++)
if (i % 3 == 0 && i % 5 == 0)
cout<<i<<" FizzBuzz\n";
else if (i % 3 == 0)
cout<<i<<" Fizz\n";