i am using a c library from c++ application and i need to fill a c struct from c++ code, this is a c++ console application. it doesnt seem to work when i assign variable values using cin. what should i do ?
serkan sendur
821
Postaholic
Banned
Recommended Answers
Jump to Postpost representative code.
Jump to PostPost a short example which doesn't seem to work.
Did you remember the
extern "C"
bit around anything which needs to be compatible with C ?Nevermind - it doesn't have code tags, so I lost interest.
Jump to PostAssuming you have declared bookrec like this:
info bookrec;
Then using >> to input information into the member variables is an option. If none of the strings will contain embedded whitespace, then it may even be the best option. If the strings representing the member variables can have …
All 10 Replies
Lerner
582
Nearly a Posting Maven
serkan sendur
821
Postaholic
Banned
Salem
5,138
Posting Sage
Lerner
582
Nearly a Posting Maven
serkan sendur
821
Postaholic
Banned
Lerner
582
Nearly a Posting Maven
serkan sendur
821
Postaholic
Banned
serkan sendur
821
Postaholic
Banned
serkan sendur
821
Postaholic
Banned
cikara21
37
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.