Click here to Skip to main content
15,915,336 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: alpha channel problem Pin
Mark Salsbery26-Feb-08 20:38
Mark Salsbery26-Feb-08 20:38 
GeneralEnable The Button Control Pin
bhat24-Feb-08 20:07
bhat24-Feb-08 20:07 
GeneralRe: Enable The Button Control Pin
Maxwell Chen24-Feb-08 20:12
Maxwell Chen24-Feb-08 20:12 
GeneralRe: Enable The Button Control Pin
bhat24-Feb-08 20:26
bhat24-Feb-08 20:26 
GeneralRe: Enable The Button Control Pin
Maxwell Chen24-Feb-08 20:34
Maxwell Chen24-Feb-08 20:34 
GeneralRe: Enable The Button Control Pin
bhat24-Feb-08 21:05
bhat24-Feb-08 21:05 
GeneralRe: Enable The Button Control Pin
Hamid_RT25-Feb-08 6:53
Hamid_RT25-Feb-08 6:53 
Generalexception in string Pin
George_George24-Feb-08 19:41
George_George24-Feb-08 19:41 
Hello everyone,


I am reviewing the exception safety of some code and met with some issues about exception safety in string, which I can not find the answer at hand. I think the 3 code segments may all throw exceptions. Because the storage of string internal character data is on heap (using allocator for char?), so when there is low memory, there will be bad_alloc exception?

1. Initialization

string str1 = "Hello"; // or string str ("Hello");


2. Assignment

string str2 = str1; // str1 is another string object or reference.


3. Empty construction

string str;


I am not quite sure about (3).


thanks in advance,
George
GeneralRe: exception in string Pin
James R. Twine25-Feb-08 4:41
James R. Twine25-Feb-08 4:41 
GeneralRe: exception in string Pin
George_George25-Feb-08 18:24
George_George25-Feb-08 18:24 
GeneralRe: exception in string Pin
James R. Twine25-Feb-08 23:45
James R. Twine25-Feb-08 23:45 
GeneralRe: exception in string Pin
George_George26-Feb-08 14:09
George_George26-Feb-08 14:09 
GeneralRe: exception in string Pin
James R. Twine27-Feb-08 1:03
James R. Twine27-Feb-08 1:03 
GeneralRe: exception in string Pin
George_George27-Feb-08 3:04
George_George27-Feb-08 3:04 
Generalcomandline compilation Pin
johnalek24-Feb-08 19:38
johnalek24-Feb-08 19:38 
GeneralRe: comandline compilation Pin
Maxwell Chen24-Feb-08 19:43
Maxwell Chen24-Feb-08 19:43 
AnswerRe: comandline compilation Pin
Rajkumar R24-Feb-08 22:46
Rajkumar R24-Feb-08 22:46 
Questionhow to know the job retention capabilities of printer Pin
Member 273427024-Feb-08 18:39
Member 273427024-Feb-08 18:39 
Generalwindows TO vista!! Pin
rowdy_vc++24-Feb-08 18:02
rowdy_vc++24-Feb-08 18:02 
GeneralRe: windows TO vista!! Pin
Christian Graus24-Feb-08 18:27
protectorChristian Graus24-Feb-08 18:27 
GeneralRe: windows TO vista!! Pin
rowdy_vc++24-Feb-08 18:35
rowdy_vc++24-Feb-08 18:35 
QuestionRe: windows TO vista!! Pin
Rajesh R Subramanian24-Feb-08 18:49
professionalRajesh R Subramanian24-Feb-08 18:49 
QuestionRe: windows TO vista!! Pin
Rajkumar R24-Feb-08 21:50
Rajkumar R24-Feb-08 21:50 
GeneralRe: windows TO vista!! Pin
rowdy_vc++24-Feb-08 22:00
rowdy_vc++24-Feb-08 22:00 
GeneralRe: windows TO vista!! Pin
Rajkumar R25-Feb-08 1:18
Rajkumar R25-Feb-08 1: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.