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 "String.h" | |
#include <cstring> | |
#include <cstdlib> | |
const size_t String::npos=-1;// greatest possible value for type size_t | |
/****************************************************** | |
Function: String | |
Arguments: None | |
Description: Default constructor | |
Return: Nothing | |
*******************************************************/ |
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 "grocery.h" | |
int main() | |
{ | |
int seed = time(0); | |
srand(seed); | |
event e; | |
L l; | |
Q q; | |
stat s; | |
int i=1,clock = 0; |
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 "nqueens.h" | |
int main() | |
{ | |
int N; | |
cout<<"Enter N value :"; | |
while(cin>>N) | |
{ | |
solveNQueens(N);//function call for the solveNQueens function. | |
} | |
return(0); |
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 "calculator.h" | |
int main() | |
{ | |
string token; | |
stack<double> S; | |
while(getline(cin, token)) | |
{ | |
process_token(token, S);//function call for the process_token function | |
} | |
return(0); |
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<cstdlib> | |
#include<ctime> | |
#include "ball.h" | |
vector<vector <bool> > traps(GRID_SIZE, vector<bool>(GRID_SIZE)); | |
vector<unsigned> ballCycles; | |
int main() | |
{ | |
unsigned B_air = 1;//Balls in air |
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 "/home/cs689/common/689.h" | |
#include "Date.h" | |
const string defaultMonth = "January";//This global constant string variable is used for default month | |
const int defaultDay = 1;//This global constant integer variable is used for default day | |
const int defaultYear = 1900;//This global constant integer variable is used for default year | |
/* | |
This is the deafault constructor | |
*/ | |
Date::Date() |
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<string> | |
#include "error.h" | |
#include "/home/cs689/common/689.h" | |
/**************************************************************** | |
FUNCTION: error | |
ARGUMENTS: string |