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<dirent.h> | |
#include<cstdio> | |
using namespace std; | |
//Shows all the subdirectories and files in mentioned location | |
int main(){ | |
const char *location="E:\\2nd_semester\\C++\\C++Phone\\Code\\music"; |
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<set> | |
using namespace std; | |
int main(){ | |
//basic 101 | |
/* | |
set<int> numSet={1,2,3,4,5,454,999,91}; |
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
// C program to print all permutations with duplicates allowed | |
#include <stdio.h> | |
#include <string.h> | |
/* Function to swap values at two pointers */ | |
void swap(char *x, char *y) | |
{ | |
char temp; | |
temp = *x; | |
*x = *y; |
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<set> | |
using namespace std; | |
int main(){ | |
set<char>mySet; | |
for(char ch='a';ch<='z';ch++){ | |
mySet.insert(ch); | |
} | |
//display |
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
/* | |
This code snippet is collected from http://www.cplusplus.com/articles/2wA0RXSz/ | |
*/ | |
#include<iostream> | |
#include<vector> | |
using namespace std; | |
const vector<string> explode(const string& s, const char& c) | |
{ |
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<array> | |
using namespace std; | |
int main(){ | |
array<int,10> myArray={1,2,3,45,23,23,100}; | |
for(auto it=myArray.begin();it!=myArray.end();it++){ | |
if(*it==0) | |
continue; |
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
//PROBLEM STATEMENT: http://www.spoj.com/problems/ECSTATIC/ | |
//ACCEPTED | |
#include<iostream> | |
#include<cmath> | |
int main(){ | |
int testCase; | |
std::cin>>testCase; | |
for(int i=0;i<testCase;i++){ | |
int times; |
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
//Problem statement : http://www.spoj.com/problems/FINDWINNER/ | |
//SOLVING NOW | |
#include<iostream> | |
int main(){ | |
int testCase; | |
std::cin>>testCase; | |
for(int t=0;t<testCase;t++){ |
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<vector> | |
#include<fstream> | |
#include<string> | |
using namespace std; | |
class Data{ | |
private: | |
string id; | |
string firstName; |
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
#if defined(UNICODE) && !defined(_UNICODE) | |
#define _UNICODE | |
#elif defined(_UNICODE) && !defined(UNICODE) | |
#define UNICODE | |
#endif | |
#include <tchar.h> | |
#include "test2.cpp"; | |
OlderNewer