Click here to Skip to main content
14,695,235 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
jschell7-Nov-15 5:58
Memberjschell7-Nov-15 5:58 
Questionsocket:send integer Pin
Member 114755491-Nov-15 5:51
MemberMember 114755491-Nov-15 5:51 
QuestionRe: socket:send integer Pin
Richard MacCutchan1-Nov-15 6:36
mveRichard MacCutchan1-Nov-15 6:36 
AnswerRe: socket:send integer Pin
Member 114755496-Nov-15 5:15
MemberMember 114755496-Nov-15 5:15 
GeneralRe: socket:send integer Pin
Richard MacCutchan6-Nov-15 5:17
mveRichard MacCutchan6-Nov-15 5:17 
AnswerRe: socket:send integer Pin
Jochen Arndt1-Nov-15 22:07
professionalJochen Arndt1-Nov-15 22:07 
GeneralRe: socket:send integer Pin
Member 114755496-Nov-15 5:16
MemberMember 114755496-Nov-15 5:16 
Questionuint32_t result of uint16_t addition Pin
elelont230-Oct-15 4:44
Memberelelont230-Oct-15 4:44 
Hi,
im having trouble understanding this line of C code (XC32, pic32):
uint16_t Cur = 65535;
uint16_t Next = 14000;
uint32_t ResVal = 0;
ResVal = ((uint32_t)Cur + (uint32_t)Next);

I believe the C standard requires that some sort of integral promotion takes place here but the result is not 79535. Instead i get an overflown uint16_t result.

How can i add two uint16_t variables and get the correct uint32_t result?
AnswerRe: uint32_t result of uint16_t addition Pin
Jochen Arndt30-Oct-15 5:00
professionalJochen Arndt30-Oct-15 5:00 
AnswerRe: uint32_t result of uint16_t addition Pin
jeron130-Oct-15 5:08
Memberjeron130-Oct-15 5:08 
AnswerRe: uint32_t result of uint16_t addition Pin
CPallini30-Oct-15 5:24
mveCPallini30-Oct-15 5:24 
AnswerRe: uint32_t result of uint16_t addition Pin
R. Erasmus4-Nov-15 0:48
MemberR. Erasmus4-Nov-15 0:48 
QuestionChange menu item text Pin
_Flaviu29-Oct-15 4:25
Member_Flaviu29-Oct-15 4:25 
AnswerRe: Change menu item text Pin
Richard MacCutchan29-Oct-15 6:20
mveRichard MacCutchan29-Oct-15 6:20 
GeneralRe: Change menu item text Pin
_Flaviu5-Nov-15 2:29
Member_Flaviu5-Nov-15 2:29 
GeneralRe: Change menu item text Pin
Richard MacCutchan5-Nov-15 6:32
mveRichard MacCutchan5-Nov-15 6:32 
GeneralRe: Change menu item text Pin
_Flaviu5-Nov-15 22:14
Member_Flaviu5-Nov-15 22:14 
GeneralRe: Change menu item text Pin
Richard MacCutchan6-Nov-15 0:20
mveRichard MacCutchan6-Nov-15 0:20 
Questionappending to file Pin
Member 1208455926-Oct-15 19:56
MemberMember 1208455926-Oct-15 19:56 
AnswerRe: appending to file Pin
Richard MacCutchan26-Oct-15 23:32
mveRichard MacCutchan26-Oct-15 23:32 
QuestionRe: appending to file Pin
David Crow27-Oct-15 4:53
MemberDavid Crow27-Oct-15 4:53 
Questionhow do you create a gamelogfile in c using program secure shell Pin
Member 1208455924-Oct-15 15:24
MemberMember 1208455924-Oct-15 15:24 
AnswerRe: how do you create a gamelogfile in c using program secure shell Pin
Richard Andrew x6424-Oct-15 17:24
professionalRichard Andrew x6424-Oct-15 17:24 
AnswerRe: how do you create a gamelogfile in c using program secure shell Pin
Richard MacCutchan24-Oct-15 22:51
mveRichard MacCutchan24-Oct-15 22:51 
GeneralRe: how do you create a gamelogfile in c using program secure shell Pin
Member 1208455925-Oct-15 5:27
MemberMember 1208455925-Oct-15 5:27 

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.