keil v5: assign member variables when creating C++ class object go wrong, after new operator all assignments are not what I set.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-11-03 6:42 PM
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.
This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0
