:smill: 👍 🐶 :Doge:
:smill:
  
    
      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
    
  
  
    
  | const int ci = i, &cr = ci; | |
| auto b = ci; // b is an int | |
| auto c = cr; // c is an int | |
| auto d = &i; // d is an int* | |
| auto e = &ci; // e is an const int* | |
| const auto f = ci; // f is an const int | |
| auto sz = 0, pi = 3.14; // ERROR: inconsistent types for sz and pi | 
  
    
      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
    
  
  
    
  | typedef char *pstring; | |
| // 此处表示指针为 constant | |
| const pstring cstr = 0; | |
| /************对比#define******/ | |
| #define pstring char* | |
| // 展开后即为 const char* cstr;意为一个指向 const char 的指针 | |
| const pstring cstr; | 
这样,重启系统后,用户“user_name”就会加入dialout组了,之后我们就能自由自在地访问ttyS设备了
sudo usermod -a -G dialout user_nameFor printf, the * allows you to specify minimum field width through an extra parameter
i.e. printf("%*d", 4, 100); specifies a field width of 4.
For scanf, the * indicates that the field is to be read but ignored
i.e. scanf("%*d %d", &i); for the input "12 34" will ignore 12 and read 34 into the integer i.
  
    
      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
    
  
  
    
  | # 拷贝 flash | |
| sudo ./flash.sh -r -k APP -G xxx.img jetson-tx2 mmcblk0p1 | |
| # 烧写 flash | |
| cp xxx.img Linux_for_Tegra_tx2/bootloader/system.img | |
| sudo ./flash.sh -r jetson-tx2 mmcblk0p1 | 
  
    
      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
    
  
  
    
  | #!/bin/bash | |
| # for 循环 | |
| for i in {1..100} | |
| do | |
| echo $i | |
| done | |
| # IF 条件判断 | |
| if [ $a == $b ] | 
NewerOlder