Skip to content

Instantly share code, notes, and snippets.

@theoremoon
theoremoon / ReadFile.h
Created May 7, 2014 09:54
CaesarEncodeProgram
#pragma once
#include <fstream>
#include <string>
void ReadFile( const char* FileName, char* StrBuf ){
std::ifstream ifs( FileName, std::ifstream::binary );
int len;
ifs.seekg( 0, ifs.end );
len = static_cast< int >( ifs.tellg() );
#include <iostream>
using namespace std;
int main(){
int a = 0b1111; // 15
int b = 0xF; // 15
cout << a << endl <<
b << endl;
fn main(){
println!("Hello World!");
}
fn hello(){
println!("Hello");
}
fn print_number(x: i32){
println!("{}", x);
}
fn print_numbers(x: i32, y: i32){
println!("{}, {}", x, y);
/*
* Raw String Literals use test.
* The result is
* This is a test string.
* Can this contain break line?
*
*/
#include <iostream>
using namespace std;
#include <iostream>
using namespace std;
constexpr unsigned long long int operator"" _K(unsigned long long int n){
return n*1024;
}
int main(){
std::cout << 1_K << endl;
/*
* judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0100&lang=jp
*
* give up
*/
#include <iostream>
#include <utility>
#include <set>
#include <cmath>
/*
* judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0103&lang=jp
*
* AC
*/
#include <iostream>
#include <string>
using namespace std;
/*
* judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0104&lang=jp
* ac
*/
#include <iostream>
using namespace std;
char field[108][108];
/*
* AOJ1147: ICPC Socre Totalizer Software
* AC
*/
#include <iostream>
#include <algorithm>
using namespace std;