cancel
Showing results for 
Search instead for 
Did you mean: 

keil v5: assign member variables when creating C++ class object go wrong, after new operator all assignments are not what I set.

ausera uirwaij
Associate III

0693W00000VOrhKQAT.png

after executing constructors:

m_Handle and bbb both with int type are not what I write, it seem it's memory alignment problem but all related class has 32bits int type member variables.

And I define g_pointer=(int*)m_Handle, the address  g_pointer saved has right value '0x0999' which I set m_handle. Why m_Handle and other member variables have wrong results?

I'm using KEIL V5 and stm32f429.

0693W00000VOrhUQAT.png

0 REPLIES 0