Click here to Skip to main content
15,929,749 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralManaging Memory Pin
deus78913-Aug-05 11:49
deus78913-Aug-05 11:49 
GeneralRe: Managing Memory Pin
John R. Shaw13-Aug-05 19:49
John R. Shaw13-Aug-05 19:49 
GeneralRe: Managing Memory Pin
S. Senthil Kumar14-Aug-05 3:45
S. Senthil Kumar14-Aug-05 3:45 
GeneralCAsyncSocket Pin
xSoptik13-Aug-05 10:18
xSoptik13-Aug-05 10:18 
GeneralRe: CAsyncSocket Pin
S Douglas15-Aug-05 1:47
professionalS Douglas15-Aug-05 1:47 
GeneralWindow sizing by actual string and font Pin
xSoptik13-Aug-05 9:53
xSoptik13-Aug-05 9:53 
GeneralRe: Window sizing by actual string and font Pin
PJ Arends13-Aug-05 10:07
professionalPJ Arends13-Aug-05 10:07 
General*char problem Pin
Axonn Echysttas13-Aug-05 9:09
Axonn Echysttas13-Aug-05 9:09 
Hey everybody. Does anybody got a clue why this code doesn't work? I wanted to simply create a string with that number in it, without using sprintf.

void Test (long lSomeValue)<br />
{<br />
	char *cValue = (char*)malloc(15);<br />
	char *cText = (char*)malloc(50);<br />
<br />
	cText = "The number is: ";<br />
	_ltoa(lSomeValue, cValue, 10);<br />
        strcat(cText, cValue);<br />
	MessageBox(0, cText, "bla", 0); //THIS NEVER GETS EXECUTED.<br />
}<br />
Test(10); //Should simply give a message box saying "The number is: 10".<br />


So how can I do this without using sprintf? And without using CString class.

-= E C H Y S T T A S =-
The Greater Mind Balance
GeneralRe: *char problem Pin
PJ Arends13-Aug-05 10:04
professionalPJ Arends13-Aug-05 10:04 
GeneralRe: *char problem Pin
Axonn Echysttas13-Aug-05 10:51
Axonn Echysttas13-Aug-05 10:51 
GeneralRe: *char problem Pin
John R. Shaw13-Aug-05 20:44
John R. Shaw13-Aug-05 20:44 
GeneralRe: *char problem Pin
Axonn Echysttas14-Aug-05 19:17
Axonn Echysttas14-Aug-05 19:17 
QuestionHow to change the icon of program by Visual C++ 6.0 Pin
Victor Lin13-Aug-05 5:45
Victor Lin13-Aug-05 5:45 
AnswerRe: How to change the icon of program by Visual C++ 6.0 Pin
Achim Klein13-Aug-05 7:43
Achim Klein13-Aug-05 7:43 
AnswerRe: How to change the icon of program by Visual C++ 6.0 Pin
cpprules13-Aug-05 12:55
cpprules13-Aug-05 12:55 
QuestionWhere I make mistake in getting input boxes from html page? Pin
Alex Shapovalov13-Aug-05 4:49
professionalAlex Shapovalov13-Aug-05 4:49 
GeneralHexEncoder class to CString Pin
Member 207257813-Aug-05 4:07
Member 207257813-Aug-05 4:07 
GeneralRe: HexEncoder class to CString Pin
Jose Lamas Rios13-Aug-05 7:14
Jose Lamas Rios13-Aug-05 7:14 
GeneralRe: HexEncoder class to CString Pin
Member 207257813-Aug-05 20:24
Member 207257813-Aug-05 20:24 
GeneralRe: HexEncoder class to CString Pin
Member 207257814-Aug-05 6:59
Member 207257814-Aug-05 6:59 
GeneralRe: HexEncoder class to CString Pin
Member 207257816-Aug-05 3:29
Member 207257816-Aug-05 3:29 
GeneralRe: HexEncoder class to CString Pin
Jose Lamas Rios17-Aug-05 4:50
Jose Lamas Rios17-Aug-05 4:50 
GeneralRe: HexEncoder class to CString Pin
Member 207257819-Aug-05 4:56
Member 207257819-Aug-05 4:56 
GeneralToolbar Pin
BicycleTheif13-Aug-05 3:07
BicycleTheif13-Aug-05 3:07 
Generalproble with hooks Pin
gamitech13-Aug-05 2:18
gamitech13-Aug-05 2:18 

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.