typeof 小用法 (typeof int state【9】)

除了此例外 还有class 和struct中,用来 new, node ,*link等,还有定义 link 函数返回class时






#include<iostream>
#include<vector>
#include<string>
#include<cstring>
#include<stack>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<functional>
#include<ctime>
#include<iomanip>
using namespace std;
int main()
{
    typedef int state[9];
    state in[100];
    for(int i=0;i<9;i++)
      for(int j=0;j<100;j++)
          in[i][j]=i*j+1;
    for(int i=0;i<9;i++)
      {int k=0;
      for(int j=0;j<100;j++)
          {cout<<setw(3)<<in[i][j];k++;if(k%5==0)  cout<<endl;}

      }

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
#include "global_define.h" uint8_t R_DiscOutVol_Cnt,R_Request_Num_BK,R_PPS_Request_Volt_BK; uint32_t R_PPS_Request_Cur_BK; uint8_t R_HVScan_RequestVol=0,R_HVScan_RequestVol_BK=0,Cnt_Delay_OutVol_Control=0; uint16_t R_VbatVol_Value,R_IbusCur_Value,R_IbatCur_Value; uint8_t R_Error_Time,R_WWDT_Time; TypeOfTimeFlag TimeFlag = {0}; TypeOfStateFlag StateFlag = {0}; //TypeOf_TypeC AP_TypeCA = {0}; TypeOf_TypeC AP_TypeCB = {0}; //TypeOf_PD AP_PDA = {0}; TypeOf_PD AP_PDB = {0}; const unsigned int CONFIG0 __at(0x00300000) = 0x0ED8F127; const uint32_t CONFIG1 __at(0x00300004) = 0x00C0FF3F; //ÓÐIAP¹¦ÄÜ,²»¿ª¿´ÃŹ·// //const unsigned int CONFIG1 __at(0x00300004) = 0x0040ffbf; const unsigned int CONFIG2 __at(0x00300008) = 0x1fffe000; const unsigned int CONFIG3 __at(0x0030000c) = 0x0000ffff; void SlotBranch100ms(void); void SlotBranch1s(void); volatile IsrFlag_Char R_Time_Flag; typedef struct{ uint8_t B_bit0: 1; }TestBits; TestBits Bits; #define check_8812 1 #define check_discharger 0 #define check_MOS 0 extern unsigned char display_gate; //¸Ãº¯ÊýÖ÷ÒªÓÃÀ´¼ì²émosµÄÓ¦Óᣠvoid check_nmos(void) { static unsigned int m,n=0; if(m<500) { m++; GPIO_WriteBit(GPIOB, GPIO_PinSource2, Bit_RESET); } else if(m<1000) { m++; GPIO_WriteBit(GPIOB, GPIO_PinSource2, Bit_SET); } else { m=0; } } unsigned char key_val=0; unsigned char device_state=0; unsigned int device_state_counter=0; #define device_state_counter_data 250 #define device_state_counter_data2 5 #define A_1 10 #define A_8 128 void led_inial(void) { DispBuf.Bits.FastCharge = RESET; DispInit(); } //Main function int main(void) { static unsigned int counter1,counter2=0,bufer; F_MCU_Initialization(); //MCU³õʼ»¯ HV_Init(); //*********************************************************************************** AP_TypeCB.TypeCx = TypeCB; AP_TypeCB.B_Support_HW = SET; AP_TypeCB.TypeC_Rp_Mode = TypeC_Cur
最新发布
07-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值