This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Name: Syed Owais Ali Chishti | |
* Tic Tac Toe | |
* Major: BS(CS) | |
*/ | |
#include<iostream> | |
#include<cstdlib> | |
#include<conio.h> | |
#include<iomanip> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Name: Syed Owais Ali Chishti | |
* Task: Snake Game with ladder | |
* Major: BS(CS) | |
*/ | |
// Help from: http://gamedev.stackexchange.com/questions/33786/snake-game-logic | |
#include <iostream> | |
#include <conio.h> // getch() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Name: Syed Owais Ali Chishti | |
* Task: Hangman | |
* Major: BS(CS) | |
*/ | |
#include <iostream> | |
#include <cstdlib> | |
#include <ctime> | |
#include <string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Name: Syed Owais Ali Chishti | |
* Roll No: P14-6011 | |
* Major: BS(CS) | |
* Course: Computer Programming Lab | |
* Task: 001 | |
*/ | |
#include<iostream> | |
#include<conio.h> // _getch() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <bitset> | |
using namespace std; | |
string stringToBinary(string str) { | |
string binary; | |
for (size_t i = 0; i < str.size(); i++) | |
{ | |
binary += bitset<8>(str.c_str()[i]).to_string(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//://stackoverflow.com/questions/275004/c-timer-function-to-provide-time-in-nano-seconds | |
#include <time.h> | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
inline __int64 GetCpuClocks() | |
{ | |
// Counter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://stackoverflow.com/questions/10184178/fastest-way-to-convert-string-to-binary | |
#include <iostream> | |
#include <bitset> | |
#include <string> | |
#include <windows.h> | |
using namespace std; | |
enum Color { DARKBLUE = 1, DARKGREEN, DARKTEAL, DARKRED, DARKPINK, DARKYELLOW, GRAY, DARKGRAY, BLUE, GREEN, TEAL, RED, PINK, YELLOW, WHITE}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: http://en.wikipedia.org/wiki/Callback_(computer_programming) | |
#include <iostream> | |
#include <cstdlib> | |
using namespace std; | |
void callback(int (*f)(int i , int b)) { | |
f(10,20); | |
//cout << f(10,20); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Source: https://askldjd.wordpress.com/2011/01/05/a-pdh-helper-class-cpdhquery/ | |
*/ | |
#include <windows.h> | |
#include <pdh.h> | |
#include <pdhmsg.h> | |
#include <string> | |
#include <map> | |
#include <sstream> |
OlderNewer