Click here to Skip to main content
15,895,011 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Structure containing byte[1] as member variable Pin
Stefan_Lang5-Sep-12 1:57
Stefan_Lang5-Sep-12 1:57 
GeneralRe: Structure containing byte[1] as member variable Pin
jschell5-Sep-12 11:26
jschell5-Sep-12 11:26 
GeneralRe: Structure containing byte[1] as member variable Pin
Stefan_Lang6-Sep-12 2:53
Stefan_Lang6-Sep-12 2:53 
GeneralRe: Structure containing byte[1] as member variable Pin
jschell6-Sep-12 8:28
jschell6-Sep-12 8:28 
AnswerRe: Structure containing byte[1] as member variable Pin
Richard MacCutchan4-Sep-12 9:07
mveRichard MacCutchan4-Sep-12 9:07 
GeneralRe: Structure containing byte[1] as member variable Pin
Rahul from Poona4-Sep-12 20:00
Rahul from Poona4-Sep-12 20:00 
GeneralRe: Structure containing byte[1] as member variable Pin
Richard MacCutchan4-Sep-12 21:46
mveRichard MacCutchan4-Sep-12 21:46 
AnswerRe: Structure containing byte[1] as member variable Pin
jschell4-Sep-12 11:46
jschell4-Sep-12 11:46 
Rahul from Poona wrote:
I m reading some data from device whose length I dont know at compile so I made
a structure as of following type to store data


What are you trying to do?

There is a common C idiom which might be applicable for what you are doing and which your structure would support - if you use it correctly.

It however isn't necessarily the best way to do that in all situations.
And as mentioned if you are not very CAREFUL then you can introduce some or all of the following problems.
- Memory leaks
- Crashes caused in any number of ways by pointer bugs.

The standard C idiom for this is found in the following link.

http://c-faq.com/struct/structhack.html[^]

Keep in mind that you must clean this up in the same way that you allocate it.
QuestionFinding crash information using the MAP file in vs2005 Pin
neha_soni4-Sep-12 1:10
neha_soni4-Sep-12 1:10 
AnswerRe: Finding crash information using the MAP file in vs2005 Pin
David Crow4-Sep-12 2:35
David Crow4-Sep-12 2:35 
AnswerRe: Finding crash information using the MAP file in vs2005 Pin
krmed4-Sep-12 3:33
krmed4-Sep-12 3:33 
AnswerRe: Finding crash information using the MAP file in vs2005 Pin
Stephen Hewitt6-Sep-12 21:46
Stephen Hewitt6-Sep-12 21:46 
Question(SOLVED) make single executable file in vs2008 (MFC) Pin
jawadali4773-Sep-12 1:26
jawadali4773-Sep-12 1:26 
AnswerRe: make single executable file in vs2008 (MFC) Pin
pasztorpisti3-Sep-12 2:05
pasztorpisti3-Sep-12 2:05 
GeneralRe: make single executable file in vs2008 (MFC) Pin
jawadali4774-Sep-12 17:42
jawadali4774-Sep-12 17:42 
GeneralRe: make single executable file in vs2008 (MFC) Pin
pasztorpisti4-Sep-12 23:04
pasztorpisti4-Sep-12 23:04 
GeneralRe: make single executable file in vs2008 (MFC) Pin
jawadali4779-Sep-12 17:45
jawadali4779-Sep-12 17:45 
GeneralRe: make single executable file in vs2008 (MFC) Pin
pasztorpisti9-Sep-12 21:26
pasztorpisti9-Sep-12 21:26 
GeneralRe: make single executable file in vs2008 (MFC) Pin
jawadali47710-Sep-12 17:17
jawadali47710-Sep-12 17:17 
AnswerRe: make single executable file in vs2008 (MFC) Pin
Stephen Hewitt3-Sep-12 16:51
Stephen Hewitt3-Sep-12 16:51 
AnswerRe: make single executable file in vs2008 (MFC) Pin
Richard MacCutchan3-Sep-12 22:22
mveRichard MacCutchan3-Sep-12 22:22 
GeneralRe: make single executable file in vs2008 (MFC) Pin
pasztorpisti4-Sep-12 1:29
pasztorpisti4-Sep-12 1:29 
GeneralRe: make single executable file in vs2008 (MFC) Pin
Richard MacCutchan4-Sep-12 5:42
mveRichard MacCutchan4-Sep-12 5:42 
AnswerRe: (SOLVED) make single executable file in vs2008 (MFC) Pin
Member 103867337-Nov-13 5:00
Member 103867337-Nov-13 5:00 
QuestionFile download from network drive Pin
Sunil P V2-Sep-12 22:22
Sunil P V2-Sep-12 22:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.