Click here to Skip to main content
15,914,500 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Misbehaving StrList.AddTail(pStr[i]); (vc++6) Pin
Viorel.13-Jun-06 5:16
Viorel.13-Jun-06 5:16 
GeneralRe: Misbehaving StrList.AddTail(pStr[i]); (vc++6) Pin
Tara1413-Jun-06 5:22
Tara1413-Jun-06 5:22 
GeneralRe: Misbehaving StrList.AddTail(pStr[i]); (vc++6) Pin
Viorel.13-Jun-06 5:36
Viorel.13-Jun-06 5:36 
GeneralRe: Misbehaving StrList.AddTail(pStr[i]); (vc++6) Pin
Tara1413-Jun-06 5:45
Tara1413-Jun-06 5:45 
GeneralRe: Misbehaving StrList.AddTail(pStr[i]); (vc++6) Pin
David Crow13-Jun-06 6:09
David Crow13-Jun-06 6:09 
AnswerRe: Misbehaving StrList.AddTail(pStr[i]); (vc++6) [modified] Pin
_AnsHUMAN_ 13-Jun-06 4:32
_AnsHUMAN_ 13-Jun-06 4:32 
GeneralRe: Misbehaving StrList.AddTail(pStr[i]); (vc++6) Pin
Tara1413-Jun-06 4:55
Tara1413-Jun-06 4:55 
QuestionCopying only first 12 chars of a string to another string? Pin
Lord Kixdemp13-Jun-06 4:04
Lord Kixdemp13-Jun-06 4:04 
Hello everyone!
This is what I want:

fileName: is730enu.exe.mtx [Correct]
unexName: is730enu.exe [Adds 4 more chars at end]
partName: is730enu.exe.000 [Same as above, but with .000 ext]

How could I do that? Like, I want to remove the last 4 chars from fileName and add that to unexName, but then add the .000 extension on the 4 chars left, but it just adds it after... I don't get it, how can it add it if I have the string on a fixed size? Thanks!

/* partName:	Return value, the part name<br />
	 * unexName:	fileName without extension*/<br />
	char *partName, *unexName;<br />
	<br />
	/* Make the unexName be fileName without the last 3 chars (extension) */<br />
	unexName = malloc(strlen(fileName) - 4);<br />
	strncpy(unexName, fileName, strlen(fileName) - 4);<br />
    <br />
	/* Add extension */<br />
	partName = malloc(strlen(fileName));<br />
	partName = mtxSplitAddExt(unexName, part);<br />
<br />
	return partName;


Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
AnswerRe: Copying only first 12 chars of a string to another string? Pin
Justin Tay13-Jun-06 4:07
Justin Tay13-Jun-06 4:07 
GeneralRe: Copying only first 12 chars of a string to another string? [modified] Pin
Lord Kixdemp13-Jun-06 4:26
Lord Kixdemp13-Jun-06 4:26 
GeneralRe: Copying only first 12 chars of a string to another string? [modified] Pin
Sebastian Schneider13-Jun-06 4:44
Sebastian Schneider13-Jun-06 4:44 
GeneralRe: Copying only first 12 chars of a string to another string? Pin
Justin Tay13-Jun-06 5:40
Justin Tay13-Jun-06 5:40 
AnswerRe: Copying only first 12 chars of a string to another string? Pin
Zac Howland13-Jun-06 4:43
Zac Howland13-Jun-06 4:43 
GeneralRe: Copying only first 12 chars of a string to another string? Pin
David Crow13-Jun-06 6:27
David Crow13-Jun-06 6:27 
GeneralRe: Copying only first 12 chars of a string to another string? Pin
Zac Howland13-Jun-06 9:04
Zac Howland13-Jun-06 9:04 
AnswerRe: Copying only first 12 chars of a string to another string? Pin
Eytukan13-Jun-06 4:45
Eytukan13-Jun-06 4:45 
GeneralRe: Copying only first 12 chars of a string to another string? [modified] Pin
Lord Kixdemp13-Jun-06 7:17
Lord Kixdemp13-Jun-06 7:17 
GeneralRe: Copying only first 12 chars of a string to another string? Pin
Justin Tay13-Jun-06 8:17
Justin Tay13-Jun-06 8:17 
GeneralRe: Copying only first 12 chars of a string to another string? Pin
Eytukan13-Jun-06 21:12
Eytukan13-Jun-06 21:12 
GeneralRe: Copying only first 12 chars of a string to another string? Pin
Lord Kixdemp14-Jun-06 15:24
Lord Kixdemp14-Jun-06 15:24 
QuestionHow to set Axes property in Excel Chart Pin
MikeRT13-Jun-06 3:54
MikeRT13-Jun-06 3:54 
QuestionFormView Color Pin
mikobi13-Jun-06 3:44
mikobi13-Jun-06 3:44 
AnswerRe: FormView Color [modified] Pin
_AnsHUMAN_ 13-Jun-06 4:02
_AnsHUMAN_ 13-Jun-06 4:02 
GeneralRe: FormView Color Pin
mikobi13-Jun-06 4:09
mikobi13-Jun-06 4:09 
AnswerRe: FormView Color Pin
Viorel.13-Jun-06 4:19
Viorel.13-Jun-06 4:19 

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.