Click here to Skip to main content
15,893,266 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSubstring for char Pin
luisgrimaldo23-Aug-08 16:21
luisgrimaldo23-Aug-08 16:21 
AnswerRe: Substring for char Pin
Paul Conrad23-Aug-08 18:23
professionalPaul Conrad23-Aug-08 18:23 
GeneralRe: Substring for char Pin
luisgrimaldo23-Aug-08 19:31
luisgrimaldo23-Aug-08 19:31 
GeneralRe: Substring for char Pin
Paul Conrad23-Aug-08 19:34
professionalPaul Conrad23-Aug-08 19:34 
GeneralRe: Substring for char Pin
luisgrimaldo23-Aug-08 19:36
luisgrimaldo23-Aug-08 19:36 
GeneralRe: Substring for char Pin
Paul Conrad23-Aug-08 19:39
professionalPaul Conrad23-Aug-08 19:39 
GeneralRe: Substring for char Pin
Paul Conrad23-Aug-08 19:46
professionalPaul Conrad23-Aug-08 19:46 
GeneralRe: Substring for char Pin
luisgrimaldo23-Aug-08 20:15
luisgrimaldo23-Aug-08 20:15 
Thanks it looks like the strncpy would work fine. but i have a problem
i have this:
char startup[MAX_PATH];
strcpy(startup, _pgmptr);
char startupnew[MAX_PATH];
strncpy(startupnew,startup,(int)(strstr(startup,"myapp.exe")-startup));


What i wanted to do was taking my app's startup path with the filename thing 'myapp.exe'. So i did this but the problem is that now startupnew, which is what i want is like: C://user/ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌ until completing the MAX_PATH, but you know in a general case I wont know the actual length of the startup path. So what can i do in this case.

I want to delete this ÌÌÌÌÌÌÌÌÌÌÌ-thing.
GeneralRe: Substring for char Pin
David Crow24-Aug-08 16:42
David Crow24-Aug-08 16:42 
AnswerRe: Substring for char Pin
Green Fuze23-Aug-08 20:06
Green Fuze23-Aug-08 20:06 
GeneralRe: Substring for char Pin
Green Fuze23-Aug-08 20:07
Green Fuze23-Aug-08 20:07 
AnswerRe: Substring for char Pin
Jijo.Raj23-Aug-08 23:26
Jijo.Raj23-Aug-08 23:26 
Questiona weird problem with global hooking of messages. Pin
Green Fuze23-Aug-08 3:07
Green Fuze23-Aug-08 3:07 
AnswerRe: a weird problem with global hooking of messages. Pin
Naveen23-Aug-08 21:32
Naveen23-Aug-08 21:32 
GeneralRe: a weird problem with global hooking of messages. Pin
Green Fuze23-Aug-08 21:47
Green Fuze23-Aug-08 21:47 
GeneralRe: a weird problem with global hooking of messages. Pin
Naveen23-Aug-08 22:20
Naveen23-Aug-08 22:20 
GeneralRe: a weird problem with global hooking of messages. Pin
Green Fuze24-Aug-08 0:35
Green Fuze24-Aug-08 0:35 
AnswerPassing the member function pointer to the AfxBeginThread and its problems. Pin
WindowsPistha23-Aug-08 3:01
WindowsPistha23-Aug-08 3:01 
GeneralRe: Passing the member function pointer to the AfxBeginThread and its problems. Pin
David Crow23-Aug-08 4:18
David Crow23-Aug-08 4:18 
GeneralRe: Passing the member function pointer to the AfxBeginThread and its problems. Pin
WindowsPistha24-Aug-08 19:11
WindowsPistha24-Aug-08 19:11 
GeneralRe: Passing the member function pointer to the AfxBeginThread and its problems. Pin
David Crow25-Aug-08 4:14
David Crow25-Aug-08 4:14 
GeneralRe: Passing the member function pointer to the AfxBeginThread and its problems. Pin
WindowsPistha26-Aug-08 4:22
WindowsPistha26-Aug-08 4:22 
QuestionDifference between 2 threads & 64 threads in VC++ Pin
lakshmiyv1723-Aug-08 2:14
lakshmiyv1723-Aug-08 2:14 
AnswerRe: Difference between 2 threads & 64 threads in VC++ [modified] Pin
SandipG 23-Aug-08 4:55
SandipG 23-Aug-08 4:55 
AnswerRe: Difference between 2 threads & 64 threads in VC++ Pin
bob1697223-Aug-08 8:22
bob1697223-Aug-08 8:22 

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.