Click here to Skip to main content
15,886,693 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to draw circle Pin
raju_shiva30-Jun-10 0:27
raju_shiva30-Jun-10 0:27 
AnswerRe: How to draw circle PinPopular
CPallini30-Jun-10 0:36
mveCPallini30-Jun-10 0:36 
AnswerRe: How to draw circle Pin
molesworth30-Jun-10 2:39
molesworth30-Jun-10 2:39 
QuestionReading from a file Pin
T.RATHA KRISHNAN30-Jun-10 0:13
T.RATHA KRISHNAN30-Jun-10 0:13 
AnswerRe: Reading from a file Pin
CPallini30-Jun-10 0:24
mveCPallini30-Jun-10 0:24 
AnswerRe: Reading from a file Pin
Aescleal30-Jun-10 0:34
Aescleal30-Jun-10 0:34 
AnswerRe: Reading from a file Pin
Rajesh R Subramanian30-Jun-10 1:26
professionalRajesh R Subramanian30-Jun-10 1:26 
QuestionOptimisation challenge... Pin
MarkB77730-Jun-10 0:00
MarkB77730-Jun-10 0:00 
Hi all,

I've got a nasty looking chuck of code that is just asking to be written better...

The function as it is works... It converts the two double parameters to string format (using a macro that I havent added below), and then joins them all together (along with the headers that are already in string format).

Would be great if someone could let me know a more eligant way to join the strings than the way I have done it...

<br />
static inline STRING lcd_ConstructLine(STRING pcH1, double dV1, STRING pcH2, double dV2)<br />
{<br />
	char acBuff1[CONV_DOUBLE_STRING_SIZE];<br />
	char acBuff2[CONV_DOUBLE_STRING_SIZE];<br />
<br />
	strcpy(acBuff1, lcd_String(dV1));<br />
	strcpy(acBuff2, lcd_String(dV2));<br />
<br />
	strcpy(_acLine, pcH1);<br />
	strcat(_acLine, acBuff1);<br />
	strcat(_acLine, pcH2);<br />
	strcat(_acLine, acBuff2);<br />
<br />
	return(_acLine);<br />
}<br />

Mark Brock
"We're definitely not going to make a G or a PG version of this. It's not PillowfightCraft." -- Chris Metzen

AnswerRe: Optimisation challenge... Pin
Aescleal30-Jun-10 0:24
Aescleal30-Jun-10 0:24 
GeneralRe: Optimisation challenge... Pin
KarstenK30-Jun-10 3:48
mveKarstenK30-Jun-10 3:48 
GeneralRe: Optimisation challenge... Pin
Aescleal30-Jun-10 4:14
Aescleal30-Jun-10 4:14 
GeneralRe: Optimisation challenge... Pin
KarstenK30-Jun-10 4:38
mveKarstenK30-Jun-10 4:38 
GeneralRe: Optimisation challenge... Pin
MarkB77730-Jun-10 10:52
MarkB77730-Jun-10 10:52 
GeneralRe: Optimisation challenge... Pin
Aescleal30-Jun-10 11:17
Aescleal30-Jun-10 11:17 
AnswerRe: Optimisation challenge... Pin
KarstenK30-Jun-10 3:50
mveKarstenK30-Jun-10 3:50 
AnswerRe: Optimisation challenge... [modified] Pin
Chris Losinger30-Jun-10 4:19
professionalChris Losinger30-Jun-10 4:19 
GeneralRe: Optimisation challenge... Pin
MarkB77730-Jun-10 11:01
MarkB77730-Jun-10 11:01 
GeneralRe: Optimisation challenge... Pin
Chris Losinger30-Jun-10 11:41
professionalChris Losinger30-Jun-10 11:41 
GeneralRe: Optimisation challenge... Pin
MarkB77730-Jun-10 12:00
MarkB77730-Jun-10 12:00 
QuestionWin32_ScheduledJob Pin
Jayapal Chandran29-Jun-10 23:36
Jayapal Chandran29-Jun-10 23:36 
Questionscollbar in CStatic Pin
kk.tvm29-Jun-10 23:28
kk.tvm29-Jun-10 23:28 
AnswerRe: scollbar in CStatic Pin
Cedric Moonen29-Jun-10 23:37
Cedric Moonen29-Jun-10 23:37 
GeneralRe: scollbar in CStatic Pin
kk.tvm29-Jun-10 23:57
kk.tvm29-Jun-10 23:57 
GeneralRe: scollbar in CStatic Pin
Cedric Moonen30-Jun-10 0:13
Cedric Moonen30-Jun-10 0:13 
GeneralRe: scollbar in CStatic Pin
kk.tvm30-Jun-10 0:39
kk.tvm30-Jun-10 0:39 

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.