Click here to Skip to main content
15,949,686 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get Active Application or File name? Pin
ShiXiangYang9-Mar-09 23:25
ShiXiangYang9-Mar-09 23:25 
GeneralRe: How to get Active Application or File name? Pin
alphaxz10-Mar-09 23:24
alphaxz10-Mar-09 23:24 
GeneralRe: How to get Active Application or File name? Pin
Hamid_RT11-Mar-09 2:54
Hamid_RT11-Mar-09 2:54 
GeneralRe: How to get Active Application or File name? Pin
alphaxz12-Mar-09 15:23
alphaxz12-Mar-09 15:23 
QuestionHome-made string constructor Pin
aab199029-Mar-09 21:34
aab199029-Mar-09 21:34 
AnswerRe: Home-made string constructor Pin
Cedric Moonen9-Mar-09 22:44
Cedric Moonen9-Mar-09 22:44 
AnswerRe: Home-made string constructor Pin
KarstenK10-Mar-09 0:14
mveKarstenK10-Mar-09 0:14 
AnswerRe: Home-made string constructor Pin
David Crow10-Mar-09 4:07
David Crow10-Mar-09 4:07 
aab19902 wrote:
I do not see the point of reserving memory for a string when you already know how much space to save...In simpler words I see no point in having a Capacity and a length?


Consider:

String s;
for (int x = 0; x < 100; x++)
    s += "A";
This will re/allocate memory 100 times within your String class -- very inefficient. Assuming that strings have an average or a minimun length, you could allocate 50 bytes up front, and then not have to allocate any more until you are close to consuming all of that. In that case, Capacity would be 50 while Length would be 0.

"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons


Questionsoftware not working in vista which work properly in xp. Pin
somnathjagtap9-Mar-09 21:32
somnathjagtap9-Mar-09 21:32 
AnswerRe: software not working in vista which work properly in xp. Pin
Hamid_RT9-Mar-09 21:46
Hamid_RT9-Mar-09 21:46 
GeneralRe: software not working in vista which work properly in xp. Pin
somnathjagtap9-Mar-09 22:25
somnathjagtap9-Mar-09 22:25 
AnswerRe: software not working in vista which work properly in xp. Pin
KarstenK9-Mar-09 22:36
mveKarstenK9-Mar-09 22:36 
GeneralRe: software not working in vista which work properly in xp. Pin
somnathjagtap9-Mar-09 22:56
somnathjagtap9-Mar-09 22:56 
GeneralRe: software not working in vista which work properly in xp. Pin
KarstenK10-Mar-09 0:09
mveKarstenK10-Mar-09 0:09 
Questionimport data from excel file Pin
trioum9-Mar-09 21:30
trioum9-Mar-09 21:30 
AnswerRe: import data from excel file Pin
Cedric Moonen9-Mar-09 21:39
Cedric Moonen9-Mar-09 21:39 
GeneralRe: import data from excel file Pin
trioum9-Mar-09 21:50
trioum9-Mar-09 21:50 
GeneralRe: import data from excel file Pin
Paresh Chitte10-Mar-09 0:29
Paresh Chitte10-Mar-09 0:29 
GeneralRe: import data from excel file Pin
David Crow10-Mar-09 4:09
David Crow10-Mar-09 4:09 
QuestionHide the cmd window using createprocess function Pin
raj15769-Mar-09 21:07
raj15769-Mar-09 21:07 
AnswerRe: Hide the cmd window using createprocess function Pin
0x3c09-Mar-09 21:17
0x3c09-Mar-09 21:17 
GeneralRe: Hide the cmd window using createprocess function Pin
raj15769-Mar-09 21:27
raj15769-Mar-09 21:27 
GeneralRe: Hide the cmd window using createprocess function Pin
0x3c010-Mar-09 6:17
0x3c010-Mar-09 6:17 
AnswerRe: Hide the cmd window using createprocess function Pin
Hamid_RT9-Mar-09 21:44
Hamid_RT9-Mar-09 21:44 
GeneralRe: Hide the cmd window using createprocess function Pin
raj15769-Mar-09 21:50
raj15769-Mar-09 21:50 

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.