Click here to Skip to main content
15,850,359 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get Active Application or File name? Pin
ShiXiangYang10-Mar-09 0:25
ShiXiangYang10-Mar-09 0:25 
GeneralRe: How to get Active Application or File name? Pin
alphaxz11-Mar-09 0:24
alphaxz11-Mar-09 0:24 
GeneralRe: How to get Active Application or File name? Pin
Hamid_RT11-Mar-09 3:54
Hamid_RT11-Mar-09 3:54 
GeneralRe: How to get Active Application or File name? Pin
alphaxz12-Mar-09 16:23
alphaxz12-Mar-09 16:23 
QuestionHome-made string constructor Pin
aab199029-Mar-09 22:34
aab199029-Mar-09 22:34 
AnswerRe: Home-made string constructor Pin
Cedric Moonen9-Mar-09 23:44
Cedric Moonen9-Mar-09 23:44 
AnswerRe: Home-made string constructor Pin
KarstenK10-Mar-09 1:14
mveKarstenK10-Mar-09 1:14 
AnswerRe: Home-made string constructor Pin
David Crow10-Mar-09 5:07
David Crow10-Mar-09 5: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 22:32
somnathjagtap9-Mar-09 22:32 
AnswerRe: software not working in vista which work properly in xp. Pin
Hamid_RT9-Mar-09 22:46
Hamid_RT9-Mar-09 22:46 
GeneralRe: software not working in vista which work properly in xp. Pin
somnathjagtap9-Mar-09 23:25
somnathjagtap9-Mar-09 23:25 
AnswerRe: software not working in vista which work properly in xp. Pin
KarstenK9-Mar-09 23:36
mveKarstenK9-Mar-09 23:36 
GeneralRe: software not working in vista which work properly in xp. Pin
somnathjagtap9-Mar-09 23:56
somnathjagtap9-Mar-09 23:56 
GeneralRe: software not working in vista which work properly in xp. Pin
KarstenK10-Mar-09 1:09
mveKarstenK10-Mar-09 1:09 
Questionimport data from excel file Pin
trioum9-Mar-09 22:30
trioum9-Mar-09 22:30 
AnswerRe: import data from excel file Pin
Cedric Moonen9-Mar-09 22:39
Cedric Moonen9-Mar-09 22:39 
GeneralRe: import data from excel file Pin
trioum9-Mar-09 22:50
trioum9-Mar-09 22:50 
GeneralRe: import data from excel file Pin
Paresh Chitte10-Mar-09 1:29
Paresh Chitte10-Mar-09 1:29 
GeneralRe: import data from excel file Pin
David Crow10-Mar-09 5:09
David Crow10-Mar-09 5:09 
QuestionHide the cmd window using createprocess function Pin
raj15769-Mar-09 22:07
raj15769-Mar-09 22:07 
AnswerRe: Hide the cmd window using createprocess function Pin
0x3c09-Mar-09 22:17
0x3c09-Mar-09 22:17 
GeneralRe: Hide the cmd window using createprocess function Pin
raj15769-Mar-09 22:27
raj15769-Mar-09 22:27 
GeneralRe: Hide the cmd window using createprocess function Pin
0x3c010-Mar-09 7:17
0x3c010-Mar-09 7:17 
AnswerRe: Hide the cmd window using createprocess function Pin
Hamid_RT9-Mar-09 22:44
Hamid_RT9-Mar-09 22:44 
GeneralRe: Hide the cmd window using createprocess function Pin
raj15769-Mar-09 22:50
raj15769-Mar-09 22: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.