Encounter some of the things sent is not very understanding, is about the conversion of the code in the multi-system;
A method of representing a number in a multiple notation:
Binary: 0bnumber (number) 2
Octal: 0number (number)8
Decimal: Default (number)ten
Hex: 0xnumber (number) 16
The use of octal definition is: write O (Euro) 12 will error, stating that C99 is not recognized:
then change to 012; octal
1#include <iostream>2 3 /*Run this program using the console Pauser or add your own getch, System ("pause") or input loop*/4 5 intMainintargcChar**argv) {6 intI=012;7printf"%d\n", i);8printf"%x\n", i);9printf"%o\n", i);Ten One return 0; A -}
Compile OK:
Started thinking that int definition can only use decimal data. Now it appears that the default is decimal, and the binary can be determined by the identifier.
1 %D: decimal shaping 2 x: Hex Shaping 3 %o: octal shaping
There is also the output of the C language in the binary output display method. There seems to be no C99 inside this now. I don't know what I should do.
Welcome to Exchange, sharing the programmer inspirational story. QQ Group of Happy programmers:
------Learning in C + +