Skip to content

Instantly share code, notes, and snippets.

@gohan-kai
gohan-kai / gist:4147220
Created November 26, 2012 08:37
Compiler Error C2220
Compiler Error C2220 - warning treated as error - no 'file' file generated
Fixes(Any One) -
1. Compile at lower warning level - "Properties->C/C++->General->Warning Level"
2. Compile without "/WX" - "Properties->C/C++->General->Treat Warning As Errors"
3. Suppress the Error - #pragma warning ( disable : 4996 )
@gohan-kai
gohan-kai / Base
Created November 30, 2012 10:24
C++ - Seeing Binary Hex Oct Decimal
//To print 'hex' and 'oct' one can simply use std::cout
int a = 10;
std::cout<< hex << a;
std::cout<< oct << a;
std::cout<< dec << a;
//To see the binary whats comes in handy is std::bitset
#include <iostream>
#include <bitset>