These rules are adopted from the AngularJS commit conventions.
This file contains hidden or 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 <SDL.h> | |
#include <cstdio> | |
#include <iostream> | |
#include <string> | |
#include <cstring> | |
#include <sstream> | |
#include <ctime> | |
const int MAX_RECORDING_DEVICES = 10; |
This file contains hidden or 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(_WIN32) | |
#define PLATFORM_WINDOWS // Windows | |
#elif defined(_WIN64) | |
#define PLATFORM_WINDOWS // Windows | |
#elif defined(__CYGWIN__) && !defined(_WIN32) | |
#define PLATFORM_WINDOWS // Windows (Cygwin POSIX under Microsoft Window) | |
#elif defined(__linux__) | |
#define PLATFORM_LINUX // Debian, Ubuntu, Gentoo, Fedora, openSUSE, RedHat, Centos and other | |
#endif |
This file contains hidden or 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 <algorithm> | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <cmath> | |
#include <string> | |
#include <sstream> | |
#if defined(_WIN32) | |
#define PLATFORM_WINDOWS // Windows |
This file contains hidden or 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> | |
#include <cstdlib> | |
#include <cstdio> | |
#include <iostream> | |
struct student { | |
int id; | |
std::string name; | |
int age; | |
char gender; |
This file contains hidden or 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 <cstring> | |
#include <cstdio> | |
#include <cstdlib> | |
int long solve_factorial(long int *factorial_memoization, int length, int long n = 1, int index = 0) | |
{ | |
*(factorial_memoization +index) = n; | |
// printf("Check of %d is %ld\n", index, factorial_memoization[index]); |
This file contains hidden or 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
#ifndef linkedlist_header_ | |
#define linkedlist_header_ | |
#include <functional> | |
namespace LinkedList{ | |
template <class T> | |
class Node | |
{ | |
public: | |
T data; |
This file contains hidden or 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 <iomanip> | |
#include <cstring> | |
class Sales{ | |
private: | |
long int sales[4][5]; | |
public: | |
Sales(){ | |
memset(sales, 0, sizeof sales); |
This file contains hidden or 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> | |
int main(int argc, const char *argv[]){ | |
float distance, fuel; | |
std::cout << "Distance traveled in mile:\n"; | |
std::cin >> distance; | |
std::cout << "Fuel used in gallon:\n"; | |
std::cin>> fuel; | |
std::cout << fuel / distance << " gallon/mile\n"; | |
return 0; |
This file contains hidden or 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 <fstream> | |
#include <iomanip> | |
int main(int argc, const char *argv[]){ | |
std::string name, surname, city; | |
std::fstream file; | |
file.open("output.txt", std::fstream::in | std::fstream::out | std::fstream::app); | |
std::cout << "Write the detail with these format. Press <Ctrl+D> to send EOF to program.\nName Surname City\n"; | |
if(file.peek() == std::ifstream::traits_type::eof()){ |