Timeline for Passing Struct Field to a function in C
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 4, 2015 at 4:03 | vote | accept | CircAnalyzer | ||
| Oct 4, 2015 at 2:39 | answer | added | Jonathan Leffler | timeline score: 2 | |
| Oct 4, 2015 at 2:38 | answer | added | Tony Ruth | timeline score: 0 | |
| Oct 4, 2015 at 2:31 | comment | added | Jonathan Leffler | @YakumoRan: there's a technical term for that suggestion: Yuck! | |
| Oct 4, 2015 at 2:28 | comment | added | Rankaba |
With pure C, you need pass an offset, so that the score can be retrieved by *((int*)((char*)&record[k]+offset)). If you use C++, you can pass a pointer to class member like &studentData::mid1
|
|
| Oct 4, 2015 at 2:23 | history | asked | CircAnalyzer | CC BY-SA 3.0 |