SensorGoldenCalTable:{   // SensorGoldenCalTable
       PixId:    3,
       SlimLscType:    0,
       Width:    0,
       Height:    0,
       OffsetX:    0,
       OffsetY:    0,
       TblSize:    0,
       IspLSCReg:    {0, 0xd04bd037, 0, 0x004d0041, 0},
       GainTable:    {

            0x62, 0x59, 0x4d, 0x5e, 0x1b, 0x56, 0xdc, 0x59, 0x48, 0x51, 0x16, 0x55, 0x73, 0x4e, 0xcf, 0x51, 
            0x83, 0x46, 0x09, 0x49, 0xfc, 0x43, 0xca, 0x46, 0xa5, 0x3e, 0xaa, 0x40, 0x68, 0x3c, 0xd9, 0x3e, 
            0xb7, 0x39, 0x55, 0x3b, 0x86, 0x37, 0xc1, 0x39, 0x1e, 0x36, 0x33, 0x37, 0x29, 0x34, 0x17, 0x36, 
            0xce, 0x33, 0x92, 0x34, 0xe2, 0x31, 0x9e, 0x33, 0xef, 0x32, 0xa9, 0x33, 0x19, 0x31, 0xba, 0x32, 
            0x75, 0x33, 0x38, 0x34, 0xa1, 0x31, 0x3c, 0x33, 0x6c, 0x35, 0x5e, 0x36, 0x7f, 0x33, 0x3d, 0x35, 
            0x9e, 0x38, 0x0b, 0x3a, 0x77, 0x36, 0x65, 0x38, 0x16, 0x3d, 0xe2, 0x3e, 0xf8, 0x3a, 0xf1, 0x3c, 
            0x55, 0x44, 0xb7, 0x46, 0xb3, 0x41, 0x4d, 0x44, 0xcd, 0x4e, 0xf7, 0x51, 0xa5, 0x4c, 0xf8, 0x4e, 
            0xa7, 0x57, 0x6d, 0x5c, 0xb2, 0x55, 0xfd, 0x57, 0x3f, 0x56, 0x97, 0x5a, 0x2e, 0x53, 0xb6, 0x56, 
            0x38, 0x4c, 0x7b, 0x4f, 0x41, 0x49, 0xce, 0x4c, 0xe7, 0x41, 0x22, 0x44, 0x48, 0x3f, 0x44, 0x42, 
            0xde, 0x3a, 0xcf, 0x3c, 0xce, 0x38, 0x3a, 0x3b, 0x28, 0x36, 0x6a, 0x37, 0x28, 0x34, 0x38, 0x36, 
            0x7e, 0x32, 0x33, 0x33, 0xa3, 0x30, 0x75, 0x32, 0xfa, 0x2f, 0xa2, 0x30, 0x66, 0x2e, 0xe5, 0x2f, 
            0x0c, 0x2f, 0x91, 0x2f, 0x8a, 0x2d, 0xdb, 0x2e, 0xaf, 0x2f, 0x4f, 0x30, 0x18, 0x2e, 0x8d, 0x2f, 
            0xc3, 0x31, 0xa6, 0x32, 0x26, 0x30, 0x94, 0x31, 0x28, 0x35, 0x56, 0x36, 0x41, 0x33, 0xef, 0x34, 
            0x98, 0x39, 0x21, 0x3b, 0x72, 0x37, 0x61, 0x39, 0xb2, 0x3f, 0xb2, 0x41, 0x5e, 0x3d, 0xc2, 0x3f, 
            0x9b, 0x49, 0x95, 0x4c, 0x35, 0x47, 0xee, 0x49, 0x66, 0x53, 0xc8, 0x57, 0x2f, 0x51, 0xcf, 0x53, 
            0xb0, 0x50, 0x55, 0x54, 0x93, 0x4d, 0x5d, 0x51, 0x58, 0x46, 0xe2, 0x48, 0x78, 0x43, 0xed, 0x46, 
            0xe9, 0x3c, 0xf7, 0x3e, 0x48, 0x3a, 0x2f, 0x3d, 0xbe, 0x36, 0x69, 0x38, 0xc3, 0x34, 0xe4, 0x36, 
            0xa1, 0x31, 0xeb, 0x32, 0x18, 0x30, 0xd4, 0x31, 0xc0, 0x2d, 0x60, 0x2e, 0x4f, 0x2c, 0xbd, 0x2d, 
            0x48, 0x2b, 0xb0, 0x2b, 0x1f, 0x2a, 0x3d, 0x2b, 0x4e, 0x2a, 0xa6, 0x2a, 0x3a, 0x29, 0x2d, 0x2a, 
            0xe7, 0x2a, 0x57, 0x2b, 0xc4, 0x29, 0xda, 0x2a, 0x2a, 0x2d, 0xbf, 0x2d, 0xd1, 0x2b, 0x08, 0x2d, 
            0xb6, 0x30, 0xba, 0x31, 0x38, 0x2f, 0xa8, 0x30, 0x70, 0x35, 0xd7, 0x36, 0xa3, 0x33, 0x77, 0x35, 
            0x3d, 0x3b, 0x0c, 0x3d, 0x06, 0x39, 0x40, 0x3b, 0xf0, 0x43, 0x2f, 0x46, 0x18, 0x41, 0x1a, 0x44, 
            0xb9, 0x4d, 0x2c, 0x51, 0x13, 0x4b, 0x07, 0x4e, 0xa8, 0x4b, 0x6c, 0x4e, 0x79, 0x48, 0x2b, 0x4c, 
            0xfa, 0x41, 0x40, 0x44, 0xf2, 0x3e, 0x7a, 0x42, 0x83, 0x39, 0x4b, 0x3b, 0xf3, 0x36, 0xde, 0x39, 
            0x3b, 0x33, 0x97, 0x34, 0x67, 0x31, 0x5f, 0x33, 0xc7, 0x2d, 0xc9, 0x2e, 0x80, 0x2c, 0xf9, 0x2d, 
            0xbf, 0x29, 0x63, 0x2a, 0xe0, 0x28, 0xcf, 0x29, 0x62, 0x27, 0xb7, 0x27, 0x98, 0x26, 0x69, 0x27, 
            0x7b, 0x26, 0xa6, 0x26, 0xc2, 0x25, 0x70, 0x26, 0x1a, 0x27, 0x60, 0x27, 0x50, 0x26, 0x04, 0x27, 
            0x44, 0x29, 0xa6, 0x29, 0x46, 0x28, 0x2e, 0x29, 0xed, 0x2c, 0x9c, 0x2d, 0xb7, 0x2b, 0xd8, 0x2c, 
            0xfb, 0x31, 0xfc, 0x32, 0x4d, 0x30, 0x08, 0x32, 0xd2, 0x37, 0x53, 0x39, 0xbf, 0x35, 0xee, 0x37, 
            0x88, 0x3f, 0x7b, 0x41, 0x00, 0x3d, 0xc5, 0x3f, 0xa3, 0x48, 0xaf, 0x4b, 0xd5, 0x45, 0x02, 0x49, 
            0xd8, 0x47, 0x24, 0x4a, 0xa2, 0x44, 0x84, 0x48, 0xc1, 0x3e, 0xb8, 0x40, 0x09, 0x3c, 0x57, 0x3f, 
            0xd8, 0x36, 0x63, 0x38, 0x8c, 0x34, 0x2b, 0x37, 0x37, 0x30, 0x5a, 0x31, 0x7a, 0x2e, 0x7f, 0x30, 
            0xba, 0x2a, 0x8b, 0x2b, 0xb7, 0x29, 0xf2, 0x2a, 0xc5, 0x26, 0x3c, 0x27, 0x25, 0x26, 0xe3, 0x26, 
            0x70, 0x24, 0xa9, 0x24, 0xe5, 0x23, 0x79, 0x24, 0x8a, 0x23, 0xa7, 0x23, 0x18, 0x23, 0x8e, 0x23, 
            0x27, 0x24, 0x61, 0x24, 0xaf, 0x23, 0x27, 0x24, 0x42, 0x26, 0x7f, 0x26, 0x91, 0x25, 0x3a, 0x26, 
            0xca, 0x29, 0x4c, 0x2a, 0xe0, 0x28, 0xd7, 0x29, 0xf8, 0x2e, 0xab, 0x2f, 0x9b, 0x2d, 0x20, 0x2f, 
            0x4d, 0x35, 0x67, 0x36, 0x53, 0x33, 0x61, 0x35, 0x84, 0x3c, 0x33, 0x3e, 0x1e, 0x3a, 0xae, 0x3c, 
            0xbf, 0x44, 0x34, 0x47, 0x14, 0x42, 0x0b, 0x45, 0x0a, 0x45, 0x28, 0x47, 0x03, 0x42, 0xab, 0x45, 
            0x77, 0x3c, 0x5d, 0x3e, 0xae, 0x39, 0x0c, 0x3d, 0xe6, 0x34, 0x4d, 0x36, 0xb2, 0x32, 0x3f, 0x35, 
            0x08, 0x2e, 0xf9, 0x2e, 0xa3, 0x2c, 0x57, 0x2e, 0x75, 0x28, 0x18, 0x29, 0x9c, 0x27, 0xad, 0x28, 
            0xaf, 0x24, 0x0c, 0x25, 0x36, 0x24, 0xbd, 0x24, 0x5c, 0x22, 0x83, 0x22, 0x0b, 0x22, 0x68, 0x22, 
            0x7e, 0x21, 0x8f, 0x21, 0x45, 0x21, 0x84, 0x21, 0x11, 0x22, 0x3a, 0x22, 0xc6, 0x21, 0x20, 0x22, 
            0x28, 0x24, 0x55, 0x24, 0xb7, 0x23, 0x33, 0x24, 0xa6, 0x27, 0xf3, 0x27, 0xc4, 0x26, 0xb9, 0x27, 
            0xd0, 0x2c, 0x44, 0x2d, 0x92, 0x2b, 0xee, 0x2c, 0x29, 0x33, 0x3c, 0x34, 0x87, 0x31, 0x66, 0x33, 
            0x54, 0x3a, 0xf1, 0x3b, 0x0b, 0x38, 0x93, 0x3a, 0x1f, 0x42, 0x9c, 0x44, 0x9d, 0x3f, 0x72, 0x42, 
            0x69, 0x43, 0x89, 0x45, 0x8e, 0x40, 0x0c, 0x44, 0x2c, 0x3b, 0xd2, 0x3c, 0x89, 0x38, 0xb0, 0x3b, 
            0x87, 0x33, 0xcf, 0x34, 0x94, 0x31, 0xef, 0x33, 0x9c, 0x2c, 0x7b, 0x2d, 0x59, 0x2b, 0xf7, 0x2c, 
            0x25, 0x27, 0x95, 0x27, 0x5b, 0x26, 0x46, 0x27, 0x56, 0x23, 0x96, 0x23, 0xf6, 0x22, 0x68, 0x23, 
            0x17, 0x21, 0x40, 0x21, 0xec, 0x20, 0x28, 0x21, 0x5c, 0x20, 0x5a, 0x20, 0x41, 0x20, 0x64, 0x20, 
            0xf0, 0x20, 0x00, 0x21, 0xc1, 0x20, 0xee, 0x20, 0xde, 0x22, 0xf4, 0x22, 0x8a, 0x22, 0xe0, 0x22, 
            0x46, 0x26, 0x74, 0x26, 0x9c, 0x25, 0x61, 0x26, 0x70, 0x2b, 0xd5, 0x2b, 0x2f, 0x2a, 0x8a, 0x2b, 
            0xf9, 0x31, 0xc9, 0x32, 0x2e, 0x30, 0x17, 0x32, 0x10, 0x39, 0x93, 0x3a, 0xda, 0x36, 0x52, 0x39, 
            0x7b, 0x40, 0x00, 0x43, 0xf2, 0x3d, 0xcc, 0x40, 0xd8, 0x42, 0xd5, 0x44, 0xaa, 0x3f, 0x60, 0x43, 
            0xc8, 0x3a, 0x53, 0x3c, 0x51, 0x38, 0x48, 0x3b, 0xfd, 0x32, 0x23, 0x34, 0x27, 0x31, 0x6f, 0x33, 
            0x15, 0x2c, 0xcb, 0x2c, 0xc5, 0x2a, 0x64, 0x2c, 0x9a, 0x26, 0x05, 0x27, 0xe5, 0x25, 0xd0, 0x26, 
            0xc8, 0x22, 0xee, 0x22, 0x6b, 0x22, 0xda, 0x22, 0xac, 0x20, 0xb2, 0x20, 0x7d, 0x20, 0xb2, 0x20, 
            0x00, 0x20, 0x00, 0x20, 0x03, 0x20, 0x00, 0x20, 0x8e, 0x20, 0x88, 0x20, 0x70, 0x20, 0x95, 0x20, 
            0x65, 0x22, 0x51, 0x22, 0x10, 0x22, 0x70, 0x22, 0xbf, 0x25, 0xe0, 0x25, 0x30, 0x25, 0xe2, 0x25, 
            0xdb, 0x2a, 0x2a, 0x2b, 0xbe, 0x29, 0xfa, 0x2a, 0x6c, 0x31, 0x3d, 0x32, 0xbc, 0x2f, 0xa3, 0x31, 
            0x95, 0x38, 0xf3, 0x39, 0x7d, 0x36, 0xd6, 0x38, 0xd3, 0x3f, 0x37, 0x42, 0x90, 0x3d, 0x39, 0x40, 
            0x48, 0x43, 0x56, 0x45, 0x43, 0x40, 0xd5, 0x43, 0x04, 0x3b, 0xa7, 0x3c, 0x4b, 0x38, 0x75, 0x3b, 
            0x49, 0x33, 0x69, 0x34, 0x57, 0x31, 0xbc, 0x33, 0x5b, 0x2c, 0x1c, 0x2d, 0x03, 0x2b, 0x9e, 0x2c, 
            0xe9, 0x26, 0x48, 0x27, 0x1c, 0x26, 0x08, 0x27, 0x1d, 0x23, 0x3b, 0x23, 0xad, 0x22, 0x23, 0x23, 
            0xe8, 0x20, 0xf9, 0x20, 0xb8, 0x20, 0xf1, 0x20, 0x3b, 0x20, 0x3c, 0x20, 0x30, 0x20, 0x39, 0x20, 
            0xcc, 0x20, 0xcd, 0x20, 0xad, 0x20, 0xc8, 0x20, 0xae, 0x22, 0xa8, 0x22, 0x55, 0x22, 0xc2, 0x22, 
            0x11, 0x26, 0x2d, 0x26, 0x5d, 0x25, 0x2c, 0x26, 0x0d, 0x2b, 0x6b, 0x2b, 0xf7, 0x29, 0x39, 0x2b, 
            0xa6, 0x31, 0x6a, 0x32, 0xfb, 0x2f, 0xe8, 0x31, 0xd7, 0x38, 0x36, 0x3a, 0xb6, 0x36, 0x21, 0x39, 
            0x06, 0x40, 0x7e, 0x42, 0xc9, 0x3d, 0x7d, 0x40, 0xa3, 0x44, 0xb2, 0x46, 0x61, 0x41, 0x21, 0x45, 
            0x20, 0x3c, 0x9b, 0x3d, 0x47, 0x39, 0x9c, 0x3c, 0x4b, 0x34, 0x8a, 0x35, 0x32, 0x32, 0xa9, 0x34, 
            0x72, 0x2d, 0x33, 0x2e, 0x05, 0x2c, 0xa3, 0x2d, 0x05, 0x28, 0x84, 0x28, 0x02, 0x27, 0x21, 0x28, 
            0x36, 0x24, 0x74, 0x24, 0xa4, 0x23, 0x3a, 0x24, 0xe5, 0x21, 0xfd, 0x21, 0x96, 0x21, 0xe5, 0x21, 
            0x25, 0x21, 0x24, 0x21, 0xe8, 0x20, 0x17, 0x21, 0xc7, 0x21, 0xd1, 0x21, 0x84, 0x21, 0xc1, 0x21, 
            0xae, 0x23, 0xc0, 0x23, 0x3f, 0x23, 0xb9, 0x23, 0x12, 0x27, 0x5e, 0x27, 0x5c, 0x26, 0x31, 0x27, 
            0x36, 0x2c, 0xab, 0x2c, 0xfa, 0x2a, 0x5e, 0x2c, 0xad, 0x32, 0x76, 0x33, 0xf8, 0x30, 0xe3, 0x32, 
            0xd1, 0x39, 0x46, 0x3b, 0x86, 0x37, 0x11, 0x3a, 0x4c, 0x41, 0xc2, 0x43, 0x0f, 0x3f, 0xc5, 0x41, 
            0xcd, 0x46, 0x2f, 0x49, 0xbf, 0x43, 0x5b, 0x47, 0xf0, 0x3d, 0x9e, 0x3f, 0x16, 0x3b, 0x4e, 0x3e, 
            0x15, 0x36, 0x65, 0x37, 0xb0, 0x33, 0x4a, 0x36, 0x8a, 0x2f, 0x7b, 0x30, 0xe4, 0x2d, 0xa0, 0x2f, 
            0xe9, 0x29, 0x97, 0x2a, 0xe1, 0x28, 0xf4, 0x29, 0x1e, 0x26, 0x75, 0x26, 0x5a, 0x25, 0x09, 0x26, 
            0xc2, 0x23, 0xed, 0x23, 0x3e, 0x23, 0xbe, 0x23, 0xdf, 0x22, 0xe4, 0x22, 0x75, 0x22, 0xd0, 0x22, 
            0x75, 0x23, 0x99, 0x23, 0x00, 0x23, 0x78, 0x23, 0x76, 0x25, 0xab, 0x25, 0xec, 0x24, 0x7f, 0x25, 
            0xfd, 0x28, 0x5d, 0x29, 0x20, 0x28, 0x0c, 0x29, 0x28, 0x2e, 0xdc, 0x2e, 0xcd, 0x2c, 0x47, 0x2e, 
            0x6a, 0x34, 0x57, 0x35, 0x85, 0x32, 0x9a, 0x34, 0x8f, 0x3b, 0x1f, 0x3d, 0x3e, 0x39, 0xdd, 0x3b, 
            0xb3, 0x43, 0x4e, 0x46, 0x5c, 0x41, 0x45, 0x44, 0x5b, 0x4a, 0x01, 0x4d, 0x5e, 0x47, 0xd9, 0x4a, 
            0xaa, 0x40, 0x9e, 0x42, 0xd0, 0x3d, 0xf6, 0x40, 0x99, 0x38, 0x30, 0x3a, 0x29, 0x36, 0xaf, 0x38, 
            0x45, 0x32, 0x89, 0x33, 0x57, 0x30, 0x37, 0x32, 0xb7, 0x2c, 0x87, 0x2d, 0x69, 0x2b, 0xaf, 0x2c, 
            0xc7, 0x28, 0x40, 0x29, 0xda, 0x27, 0xb0, 0x28, 0x6a, 0x26, 0xb0, 0x26, 0xb1, 0x25, 0x56, 0x26, 
            0x82, 0x25, 0x98, 0x25, 0xe2, 0x24, 0x57, 0x25, 0x0d, 0x26, 0x4f, 0x26, 0x5f, 0x25, 0x05, 0x26, 
            0x1c, 0x28, 0x8c, 0x28, 0x56, 0x27, 0x23, 0x28, 0xb7, 0x2b, 0x61, 0x2c, 0xa0, 0x2a, 0xc6, 0x2b, 
            0xc3, 0x30, 0xc3, 0x31, 0x41, 0x2f, 0xe7, 0x30, 0xba, 0x36, 0xf4, 0x37, 0xbf, 0x34, 0xf1, 0x36, 
            0x6f, 0x3e, 0x23, 0x40, 0x2c, 0x3c, 0xb0, 0x3e, 0x7d, 0x47, 0x59, 0x4a, 0xf5, 0x44, 0xdd, 0x47, 
            0x2b, 0x4f, 0x67, 0x52, 0x3d, 0x4c, 0xb0, 0x4f, 0xf5, 0x44, 0x40, 0x47, 0xf5, 0x41, 0x09, 0x45, 
            0xaa, 0x3b, 0x8d, 0x3d, 0x1f, 0x39, 0xd1, 0x3b, 0x7c, 0x35, 0x08, 0x37, 0x5d, 0x33, 0x71, 0x35, 
            0x73, 0x30, 0x7c, 0x31, 0xbd, 0x2e, 0x4f, 0x30, 0x6d, 0x2c, 0x25, 0x2d, 0x1e, 0x2b, 0x36, 0x2c, 
            0xff, 0x29, 0x57, 0x2a, 0xc3, 0x28, 0xd2, 0x29, 0x06, 0x29, 0x45, 0x29, 0x02, 0x28, 0xde, 0x28, 
            0x92, 0x29, 0xf4, 0x29, 0x77, 0x28, 0x67, 0x29, 0xb3, 0x2b, 0x54, 0x2c, 0x97, 0x2a, 0xaa, 0x2b, 
            0x44, 0x2f, 0x44, 0x30, 0xf9, 0x2d, 0x57, 0x2f, 0x03, 0x34, 0x59, 0x35, 0x4b, 0x32, 0x24, 0x34, 
            0xb4, 0x39, 0x83, 0x3b, 0xba, 0x37, 0x0a, 0x3a, 0x7a, 0x42, 0x88, 0x44, 0x1d, 0x40, 0xb7, 0x42, 
            0x2c, 0x4c, 0x97, 0x4f, 0xe5, 0x49, 0x96, 0x4c, 0xa7, 0x54, 0x73, 0x58, 0xee, 0x51, 0x15, 0x55, 
            0x9f, 0x4a, 0x68, 0x4d, 0x99, 0x47, 0xc0, 0x4a, 0x1a, 0x40, 0x43, 0x42, 0x61, 0x3d, 0x19, 0x40, 
            0x7e, 0x39, 0x2f, 0x3b, 0x19, 0x37, 0x60, 0x39, 0x8a, 0x34, 0xc3, 0x35, 0x6f, 0x32, 0x52, 0x34, 
            0xd3, 0x30, 0xa4, 0x31, 0x1a, 0x2f, 0x8c, 0x30, 0x70, 0x2e, 0xe9, 0x2e, 0xc5, 0x2c, 0x19, 0x2e, 
            0x59, 0x2d, 0xeb, 0x2d, 0xe6, 0x2b, 0x22, 0x2d, 0x01, 0x2e, 0x99, 0x2e, 0x80, 0x2c, 0xd1, 0x2d, 
            0x09, 0x30, 0xdf, 0x30, 0x77, 0x2e, 0xf7, 0x2f, 0x5a, 0x33, 0xa8, 0x34, 0xad, 0x31, 0x66, 0x33, 
            0xd9, 0x37, 0x79, 0x39, 0xeb, 0x35, 0xef, 0x37, 0x19, 0x3e, 0x12, 0x40, 0xe8, 0x3b, 0x59, 0x3e, 
            0x1c, 0x48, 0xcb, 0x4a, 0xba, 0x45, 0x8c, 0x48, 0xca, 0x51, 0xb0, 0x55, 0xa9, 0x4f, 0x52, 0x52, 
            0x72, 0x58, 0x19, 0x5d, 0xc4, 0x55, 0xcb, 0x58, 0x2d, 0x50, 0xb5, 0x53, 0x7f, 0x4d, 0x62, 0x50, 
            0x09, 0x45, 0xf5, 0x47, 0x5f, 0x42, 0xe5, 0x44, 0x87, 0x3d, 0xca, 0x3f, 0xff, 0x3a, 0x3c, 0x3d, 
            0x4d, 0x38, 0x15, 0x3a, 0x10, 0x36, 0xfe, 0x37, 0xd5, 0x34, 0x2d, 0x36, 0xd3, 0x32, 0x6f, 0x34, 
            0x87, 0x32, 0xa4, 0x33, 0xae, 0x30, 0x3f, 0x32, 0x96, 0x31, 0x8b, 0x32, 0xb2, 0x2f, 0x35, 0x31, 
            0x24, 0x32, 0x2d, 0x33, 0x66, 0x30, 0xe6, 0x31, 0x1e, 0x34, 0x72, 0x35, 0x26, 0x32, 0xe5, 0x33, 
            0x18, 0x37, 0xd6, 0x38, 0x3a, 0x35, 0x12, 0x37, 0xab, 0x3b, 0xf5, 0x3d, 0x90, 0x39, 0xd6, 0x3b, 
            0x0a, 0x43, 0xa7, 0x45, 0xcf, 0x40, 0x31, 0x43, 0xf8, 0x4d, 0xb3, 0x51, 0x8d, 0x4b, 0x37, 0x4e, 
            0x4d, 0x56, 0x77, 0x5b, 0x71, 0x54, 0xde, 0x56, 
       },
}, 

C++ Online Compiler

Write, Run & Share C++ code online using OneCompiler's C++ online compiler for free. It's one of the robust, feature-rich online compilers for C++ language, running on the latest version 17. Getting started with the OneCompiler's C++ compiler is simple and pretty fast. The editor shows sample boilerplate code when you choose language as C++ and start coding!

Read inputs from stdin

OneCompiler's C++ online compiler supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample program which takes name as input and print your name with hello.

#include <iostream>
#include <string>
using namespace std;

int main() 
{
    string name;
    cout << "Enter name:";
    getline (cin, name);
    cout << "Hello " << name;
    return 0;
}

About C++

C++ is a widely used middle-level programming language.

  • Supports different platforms like Windows, various Linux flavours, MacOS etc
  • C++ supports OOPS concepts like Inheritance, Polymorphism, Encapsulation and Abstraction.
  • Case-sensitive
  • C++ is a compiler based language
  • C++ supports structured programming language
  • C++ provides alot of inbuilt functions and also supports dynamic memory allocation.
  • Like C, C++ also allows you to play with memory using Pointers.

Syntax help

Loops

1. If-Else:

When ever you want to perform a set of operations based on a condition If-Else is used.

if(conditional-expression) {
   //code
}
else {
   //code
}

You can also use if-else for nested Ifs and If-Else-If ladder when multiple conditions are to be performed on a single variable.

2. Switch:

Switch is an alternative to If-Else-If ladder.

switch(conditional-expression){    
case value1:    
 // code    
 break;  // optional  
case value2:    
 // code    
 break;  // optional  
......    
    
default:     
 code to be executed when all the above cases are not matched;    
} 

3. For:

For loop is used to iterate a set of statements based on a condition.

for(Initialization; Condition; Increment/decrement){  
  //code  
} 

4. While:

While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.

while (condition) {  
// code 
}  

5. Do-While:

Do-while is also used to iterate a set of statements based on a condition. It is mostly used when you need to execute the statements atleast once.

do {  
 // code 
} while (condition); 

Functions

Function is a sub-routine which contains set of statements. Usually functions are written when multiple calls are required to same set of statements which increases re-usuability and modularity. Function gets run only when it is called.

How to declare a Function:

return_type function_name(parameters);

How to call a Function:

function_name (parameters)

How to define a Function:

return_type function_name(parameters) {  
 // code
}