Click here to Skip to main content
16,004,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Merge project Pin
KarstenK2-Aug-07 1:38
mveKarstenK2-Aug-07 1:38 
GeneralRe: Merge project Pin
Max++2-Aug-07 1:47
Max++2-Aug-07 1:47 
GeneralRe: Merge project Pin
KarstenK2-Aug-07 1:50
mveKarstenK2-Aug-07 1:50 
GeneralRe: Merge project Pin
Max++2-Aug-07 2:19
Max++2-Aug-07 2:19 
QuestionRetrieve a character from a string Pin
Perspx2-Aug-07 0:26
Perspx2-Aug-07 0:26 
AnswerRe: Retrieve a character from a string Pin
mandanani2-Aug-07 0:51
mandanani2-Aug-07 0:51 
GeneralRe: Retrieve a character from a string Pin
KarstenK2-Aug-07 1:40
mveKarstenK2-Aug-07 1:40 
AnswerRe: Retrieve a character from a string Pin
CPallini2-Aug-07 0:52
mveCPallini2-Aug-07 0:52 
Perspx wrote:
char *buffer;

then some memory is allocated with:

buffer=(char *)malloc(10);

then some text is placed here:

strcpy(buffer, "some text");


You're lucky: the string fits exactly inside the buffer (i.e. take care)!


Perspx wrote:
then i want to return a character from buffer (for example, the first character which is 's'), how do I do this?

buffer[0] or *buffer.
Smile | :)

P.S. Remember to free the buffer.







If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

AnswerRe: Retrieve a character from a string Pin
Paresh Chitte2-Aug-07 0:52
Paresh Chitte2-Aug-07 0:52 
AnswerRe: Retrieve a character from a string Pin
Sivaprasad S Nair2-Aug-07 1:21
professionalSivaprasad S Nair2-Aug-07 1:21 
GeneralRe: Retrieve a character from a string Pin
toxcct2-Aug-07 2:40
toxcct2-Aug-07 2:40 
GeneralRe: Retrieve a character from a string Pin
Sivaprasad S Nair2-Aug-07 18:39
professionalSivaprasad S Nair2-Aug-07 18:39 
GeneralRe: Retrieve a character from a string Pin
toxcct2-Aug-07 21:13
toxcct2-Aug-07 21:13 
GeneralRe: Retrieve a character from a string Pin
Paresh Chitte2-Aug-07 21:19
Paresh Chitte2-Aug-07 21:19 
GeneralRe: Retrieve a character from a string Pin
Sivaprasad S Nair2-Aug-07 18:48
professionalSivaprasad S Nair2-Aug-07 18:48 
GeneralRe: Retrieve a character from a string Pin
Perspx3-Aug-07 2:36
Perspx3-Aug-07 2:36 
QuestionDialog box query Pin
dona jain1-Aug-07 23:46
dona jain1-Aug-07 23:46 
AnswerRe: Dialog box query Pin
KarstenK1-Aug-07 23:51
mveKarstenK1-Aug-07 23:51 
AnswerRe: Dialog box query Pin
Naveen1-Aug-07 23:51
Naveen1-Aug-07 23:51 
AnswerRe: Dialog box query Pin
CPallini2-Aug-07 0:00
mveCPallini2-Aug-07 0:00 
GeneralRe: Dialog box query Pin
Christian Graus2-Aug-07 0:14
protectorChristian Graus2-Aug-07 0:14 
GeneralRe: Dialog box query Pin
CPallini2-Aug-07 0:25
mveCPallini2-Aug-07 0:25 
AnswerRe: Dialog box query Pin
Sivaprasad S Nair2-Aug-07 1:40
professionalSivaprasad S Nair2-Aug-07 1:40 
GeneralRe: Dialog box query Pin
Christian Graus2-Aug-07 2:00
protectorChristian Graus2-Aug-07 2:00 
QuestionActiveX: Transfer between Control and PropertyPage Pin
AnTri1-Aug-07 23:41
AnTri1-Aug-07 23:41 

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.