Click here to Skip to main content
16,014,838 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: why why??? Pin
pnpfriend1-Jun-02 5:49
pnpfriend1-Jun-02 5:49 
AnswerHave your ever used debugger? Pin
soptest31-May-02 9:46
soptest31-May-02 9:46 
GeneralRe: Have your ever used debugger? Pin
Tomasz Sowinski31-May-02 10:22
Tomasz Sowinski31-May-02 10:22 
GeneralRe: Have your ever used debugger? Pin
soptest31-May-02 13:32
soptest31-May-02 13:32 
GeneralRe: Have your ever used debugger? Pin
Tomasz Sowinski31-May-02 22:43
Tomasz Sowinski31-May-02 22:43 
GeneralRe: Have your ever used debugger? Pin
pnpfriend1-Jun-02 5:51
pnpfriend1-Jun-02 5:51 
GeneralString Manipulation Problem Pin
Sidney31-May-02 8:36
Sidney31-May-02 8:36 
GeneralRe: String Manipulation Problem Pin
Navin31-May-02 8:57
Navin31-May-02 8:57 
Are you using MFC?

If so, you can use CString function Mid, for instance:

<br />
CString str1;<br />
str1 = "The Quick Brown Fox Jumps Over The Lazy Dog";<br />
<br />
CString str2 = str1.Mid(10,5);    // I hope I didn't miscount.. :)<br />


I love CString. Big Grin | :-D If you are using stl, there are similar functions there I think, but I don't know stl well enough. Now if you are not using MFC or stl, you can do it in a loop.

<br />
char str2[6];      // Length of 5, plus the ending null character<br />
for(int i = 0; i < 5; i++)<br />
   str2[i] = str1[10 + i];<br />
<br />
str2[5] = '\0';    // All strings must end with this character<br />


I'm sure there are other ways, too.


No generalization is 100% true.
Not even this one.
GeneralRe: String Manipulation Problem Pin
Jonathan Craig31-May-02 9:45
Jonathan Craig31-May-02 9:45 
GeneralRe: String Manipulation Problem Pin
Navin31-May-02 10:16
Navin31-May-02 10:16 
GeneralRe: String Manipulation Problem Pin
Sidney31-May-02 11:37
Sidney31-May-02 11:37 
GeneralRe: String Manipulation Problem Pin
Christian Graus31-May-02 13:09
protectorChristian Graus31-May-02 13:09 
General"right way" to display hex number in edit Pin
BlackDogEngineering31-May-02 8:34
BlackDogEngineering31-May-02 8:34 
GeneralRe: "right way" to display hex number in edit Pin
Ravi Bhavnani31-May-02 8:59
professionalRavi Bhavnani31-May-02 8:59 
GeneralRe: "right way" to display hex number in edit Pin
Michael Dunn31-May-02 11:46
sitebuilderMichael Dunn31-May-02 11:46 
Generalerror C2660: 'new' : function does not take 3 parameters Pin
Crystal31-May-02 8:37
Crystal31-May-02 8:37 
GeneralRe: error C2660: 'new' : function does not take 3 parameters Pin
Ed Gadziemski31-May-02 11:15
professionalEd Gadziemski31-May-02 11:15 
GeneralRe: error C2660: 'new' : function does not take 3 parameters Pin
Christian Graus31-May-02 13:10
protectorChristian Graus31-May-02 13:10 
GeneralRe: error C2660: 'new' : function does not take 3 parameters Pin
Ed Gadziemski31-May-02 14:47
professionalEd Gadziemski31-May-02 14:47 
GeneralRe: error C2660: 'new' : function does not take 3 parameters Pin
Christian Graus31-May-02 13:13
protectorChristian Graus31-May-02 13:13 
GeneralRe: error C2660: 'new' : function does not take 3 parameters Pin
Ed Gadziemski1-Jun-02 4:07
professionalEd Gadziemski1-Jun-02 4:07 
QuestionHow can I add a splash screen to my VC++.net porject??? Pin
chaolong31-May-02 8:13
chaolong31-May-02 8:13 
Generaltimespec equivalent in C++ Pin
lucy31-May-02 8:19
lucy31-May-02 8:19 
GeneralRe: timespec equivalent in C++ Pin
Tomasz Sowinski31-May-02 8:17
Tomasz Sowinski31-May-02 8:17 
GeneralRe: timespec equivalent in C++ Pin
lucy31-May-02 8:26
lucy31-May-02 8:26 

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.