Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: About AUTONUMBERS AND UPDATION Pin
savitri26-Apr-08 2:36
savitri26-Apr-08 2:36 
GeneralRe: About AUTONUMBERS AND UPDATION Pin
Christian Graus26-Apr-08 11:10
protectorChristian Graus26-Apr-08 11:10 
GeneralRe: About AUTONUMBERS AND UPDATION Pin
Christian Graus26-Apr-08 0:50
protectorChristian Graus26-Apr-08 0:50 
QuestionHow to create a hidden folder? Pin
MD8425-Apr-08 22:23
MD8425-Apr-08 22:23 
GeneralRe: How to create a hidden folder? Pin
Rajkumar R25-Apr-08 23:56
Rajkumar R25-Apr-08 23:56 
QuestionHow do I pass String class to a function Pin
pl_kode25-Apr-08 22:21
pl_kode25-Apr-08 22:21 
AnswerRe: How do I pass String class to a function Pin
CPallini25-Apr-08 22:56
mveCPallini25-Apr-08 22:56 
GeneralRe: How do I pass String class to a function Pin
Cedric Moonen25-Apr-08 23:37
Cedric Moonen25-Apr-08 23:37 
Replace the first option by:

void new_function(const string& s)
{
// whatever
}


This achieve the same result but is more efficient: you don't duplicate the object you pass to the function. The end result is the same (and even safer) because if you were trying to modify the string (in your option), this would have no impact over the original object. With passing the object as a const reference, you ensure that what is in the fact won't try to change the object.

Cédric Moonen
Software developer

Charting control [v1.4 - Updated]

AnswerRe: How do I pass String class to a function Pin
zengkun10026-Apr-08 2:56
zengkun10026-Apr-08 2:56 
QuestionDLL in Visual C++6 Pin
Member 430138525-Apr-08 19:31
Member 430138525-Apr-08 19:31 
GeneralRe: DLL in Visual C++6 Pin
Saurabh.Garg25-Apr-08 20:31
Saurabh.Garg25-Apr-08 20:31 
GeneralRe: DLL in Visual C++6 Pin
Hamid_RT25-Apr-08 20:40
Hamid_RT25-Apr-08 20:40 
GeneralCOM unable to obtain interface - Pin
act_x25-Apr-08 13:12
act_x25-Apr-08 13:12 
GeneralRe: COM unable to obtain interface - Pin
Tarmo Kalda25-Apr-08 20:50
Tarmo Kalda25-Apr-08 20:50 
QuestionRe: COM unable to obtain interface - Pin
CPallini25-Apr-08 22:50
mveCPallini25-Apr-08 22:50 
GeneralRe: COM unable to obtain interface - Pin
act_x28-Apr-08 7:40
act_x28-Apr-08 7:40 
GeneralRe: COM unable to obtain interface - Pin
CPallini28-Apr-08 9:58
mveCPallini28-Apr-08 9:58 
QuestionAddSearchProvider for all browsers Pin
vikrant kpr25-Apr-08 10:50
vikrant kpr25-Apr-08 10:50 
GeneralINTRODUCTION Pin
tuneroz25-Apr-08 8:46
tuneroz25-Apr-08 8:46 
GeneralRe: INTRODUCTION Pin
Joan M25-Apr-08 8:51
professionalJoan M25-Apr-08 8:51 
GeneralRe: INTRODUCTION Pin
Hamid_RT25-Apr-08 9:15
Hamid_RT25-Apr-08 9:15 
GeneralRe: INTRODUCTION Pin
tuneroz25-Apr-08 9:26
tuneroz25-Apr-08 9:26 
GeneralRe: INTRODUCTION Pin
Hamid_RT25-Apr-08 20:41
Hamid_RT25-Apr-08 20:41 
GeneralRe: INTRODUCTION Pin
CPallini25-Apr-08 9:56
mveCPallini25-Apr-08 9:56 
GeneralRe: INTRODUCTION Pin
Hamid_RT25-Apr-08 20:38
Hamid_RT25-Apr-08 20:38 

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.