Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CStringArray Pin
Maximilien2-Dec-04 7:03
Maximilien2-Dec-04 7:03 
GeneralRe: CStringArray Pin
BlackDice2-Dec-04 7:53
BlackDice2-Dec-04 7:53 
GeneralRe: CStringArray Pin
BlackDice2-Dec-04 7:54
BlackDice2-Dec-04 7:54 
GeneralRe: CStringArray Pin
David Crow2-Dec-04 10:32
David Crow2-Dec-04 10:32 
GeneralRe: CStringArray Pin
Graham Bradshaw2-Dec-04 11:09
Graham Bradshaw2-Dec-04 11:09 
GeneralSubtraction of Integer on Character Array [C++] Pin
Shaitan002-Dec-04 6:49
Shaitan002-Dec-04 6:49 
GeneralRe: Subtraction of Integer on Character Array [C++] Pin
Maximilien2-Dec-04 7:05
Maximilien2-Dec-04 7:05 
GeneralRe: Subtraction of Integer on Character Array [C++] Pin
RChin2-Dec-04 7:11
RChin2-Dec-04 7:11 
Shaitan00 wrote:
I assuming either some casting or conversions are required

Thats right. You cannot perform any arithmetic ops on a char array and and integer like that in a meaningful way.

You will first need to convert your array, tmpbuf, to its numeric value. Do the arithmetic using the two numbers, then reconvert back to its string representation.

Shaitan00 wrote:
tmpbuf = tmpbuf - arith;
This will not work as you cannot copy array values like this. You can use the memcpy function for this, but only for array transfer.

Use the atoi() function to convert your string to a number. then you can use the itoa to reconvert.




I Dream of Absolute Zero

GeneralRe: Subtraction of Integer on Character Array [C++] Pin
John R. Shaw2-Dec-04 17:23
John R. Shaw2-Dec-04 17:23 
GeneralScrolling in CRichEditView Pin
zhngmm2-Dec-04 5:46
zhngmm2-Dec-04 5:46 
GeneralExport Outlook Mailboxes programmatically Pin
Kri52-Dec-04 4:55
Kri52-Dec-04 4:55 
GeneralInterrupts & Timers Pin
sweep1232-Dec-04 4:50
sweep1232-Dec-04 4:50 
GeneralRe: Interrupts & Timers Pin
Antony M Kancidrowski2-Dec-04 5:35
Antony M Kancidrowski2-Dec-04 5:35 
GeneralRe: Interrupts & Timers Pin
sweep1232-Dec-04 5:44
sweep1232-Dec-04 5:44 
GeneralRe: Interrupts & Timers Pin
Antony M Kancidrowski2-Dec-04 6:19
Antony M Kancidrowski2-Dec-04 6:19 
GeneralUpgrade DB Pin
Ouenstreet2-Dec-04 4:24
Ouenstreet2-Dec-04 4:24 
GeneralRe: Upgrade DB Pin
David Crow2-Dec-04 6:01
David Crow2-Dec-04 6:01 
GeneralRe: Upgrade DB Pin
Ouenstreet3-Dec-04 9:56
Ouenstreet3-Dec-04 9:56 
GeneralRe: Upgrade DB Pin
David Crow3-Dec-04 10:09
David Crow3-Dec-04 10:09 
GeneralPlagarisms Pin
Anonymous2-Dec-04 4:21
Anonymous2-Dec-04 4:21 
GeneralRe: Plagarisms Pin
David Crow2-Dec-04 5:30
David Crow2-Dec-04 5:30 
GeneralRe: Plagarisms Pin
Blake Miller2-Dec-04 10:38
Blake Miller2-Dec-04 10:38 
GeneralRe: Plagarisms Pin
PJ Arends2-Dec-04 11:04
professionalPJ Arends2-Dec-04 11:04 
Generalsoundcard line in data acquisition Pin
gecool2-Dec-04 4:15
gecool2-Dec-04 4:15 
QuestionVisual Studio.net Project - Which folder(s) contain the actual project files that should be backed up?? Pin
jerry1211a2-Dec-04 4:09
jerry1211a2-Dec-04 4:09 

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.