Click here to Skip to main content
15,922,630 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Help with Resizing Bitmap loaded with LoadImage() and Attach to CImagelist object Pin
EternalWyrm20-Nov-19 6:58
EternalWyrm20-Nov-19 6:58 
AnswerRe: Help with Resizing Bitmap loaded with LoadImage() and Attach to CImagelist object Pin
leon de boer8-Dec-19 13:24
leon de boer8-Dec-19 13:24 
QuestionVS2008 Map files, this can't be this hard! Pin
charlieg18-Nov-19 12:48
charlieg18-Nov-19 12:48 
AnswerRe: VS2008 Map files, this can't be this hard! Pin
Randor 24-Nov-19 16:04
professional Randor 24-Nov-19 16:04 
GeneralRe: VS2008 Map files, this can't be this hard! Pin
charlieg25-Nov-19 5:45
charlieg25-Nov-19 5:45 
GeneralRe: VS2008 Map files, this can't be this hard! Pin
Randor 25-Nov-19 7:08
professional Randor 25-Nov-19 7:08 
Questionc++ string_view Pin
T Bones Jones14-Nov-19 11:38
T Bones Jones14-Nov-19 11:38 
AnswerRe: c++ string_view Pin
Graham Breach14-Nov-19 12:10
Graham Breach14-Nov-19 12:10 
GeneralRe: c++ string_view Pin
T Bones Jones15-Nov-19 3:44
T Bones Jones15-Nov-19 3:44 
QuestionPROGRAMMER'S MOM- Needs your help =) Pin
Member 1465597214-Nov-19 7:57
Member 1465597214-Nov-19 7:57 
AnswerRe: PROGRAMMER'S MOM- Needs your help =) Pin
OriginalGriff14-Nov-19 7:59
mveOriginalGriff14-Nov-19 7:59 
Questionpassword in star form Pin
Member 1461560311-Nov-19 23:34
Member 1461560311-Nov-19 23:34 
AnswerRe: password in star form Pin
CPallini12-Nov-19 0:33
mveCPallini12-Nov-19 0:33 
SuggestionRe: password in star form Pin
David Crow12-Nov-19 5:48
David Crow12-Nov-19 5:48 
AnswerRe: password in star form Pin
Stefan_Lang12-Nov-19 21:07
Stefan_Lang12-Nov-19 21:07 
QuestionHow to make the heap address(by new) have the same every time the program runs? Pin
Member 1308136910-Nov-19 15:36
Member 1308136910-Nov-19 15:36 
AnswerRe: How to make the heap address(by new) have the same every time the program runs? Pin
k505410-Nov-19 16:19
mvek505410-Nov-19 16:19 
GeneralRe: How to make the heap address(by new) have the same every time the program runs? Pin
Member 1308136920-Nov-19 15:48
Member 1308136920-Nov-19 15:48 
AnswerRe: How to make the heap address(by new) have the same every time the program runs? Pin
CPallini11-Nov-19 22:10
mveCPallini11-Nov-19 22:10 
GeneralRe: How to make the heap address(by new) have the same every time the program runs? Pin
Member 1308136920-Nov-19 15:49
Member 1308136920-Nov-19 15:49 
QuestionRe: How to make the heap address(by new) have the same every time the program runs? Pin
David Crow12-Nov-19 5:46
David Crow12-Nov-19 5:46 
AnswerRe: How to make the heap address(by new) have the same every time the program runs? Pin
Member 1308136920-Nov-19 15:56
Member 1308136920-Nov-19 15:56 
AnswerRe: How to make the heap address(by new) have the same every time the program runs? Pin
leon de boer13-Nov-19 2:34
leon de boer13-Nov-19 2:34 
The question is stupid, there is no way a dynamic heap manager can guarantee it wont give the memory space away to some other call for memory allocation. To do what you asked it would have to keep the memory "available" anyhow, so for the love of all things coding just declare the thing static in that case (unless you actually want a global).

My C++ is rusty with string objects but it should be something like
static char* str = char[128];

In C it is simpler
static char str[128];

Problem solved it now has the same address everytime locally, and effectively does the same thing that any crazy heap manager doing what you asked would have to do.

I am assuming you are going to change the string at times, so you want a variable not a constant.
In vino veritas


modified 13-Nov-19 8:47am.

GeneralRe: How to make the heap address(by new) have the same every time the program runs? Pin
Richard MacCutchan13-Nov-19 5:01
mveRichard MacCutchan13-Nov-19 5:01 
QuestionCTreeCtrl item images without CImageList ? Pin
Maximilien30-Oct-19 8:32
Maximilien30-Oct-19 8:32 

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.