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

C / C++ / MFC

 
AnswerRe: MFC Listview Pin
switang16-Nov-06 10:55
switang16-Nov-06 10:55 
QuestionProblem in #import statement Pin
Sakthiu16-Nov-06 1:30
Sakthiu16-Nov-06 1:30 
QuestionRe: Problem in #import statement Pin
prasad_som16-Nov-06 1:49
prasad_som16-Nov-06 1:49 
AnswerRe: Problem in #import statement Pin
Sakthiu16-Nov-06 1:56
Sakthiu16-Nov-06 1:56 
QuestionRe: Problem in #import statement Pin
prasad_som16-Nov-06 2:31
prasad_som16-Nov-06 2:31 
AnswerRe: Problem in #import statement Pin
bob1697216-Nov-06 3:27
bob1697216-Nov-06 3:27 
AnswerRe: Problem in #import statement Pin
Hamid_RT16-Nov-06 8:06
Hamid_RT16-Nov-06 8:06 
Questionstrncpy.... [modified] Pin
Programm3r16-Nov-06 1:27
Programm3r16-Nov-06 1:27 
Hi all,


Is it possible to use the strncpy() function to achive the following:

FileName1.txt to FileName1.abc

I have tried the following:

<code>
int ExtensionLen;
char *ExtensionString;
ExtensionString = FileNameFromClient;
ExtensionLen = strlen(ExtensionString) - 4;
char extstring[20];   
strncpy( (char*)extstring, ExtensionString, ExtensionLen );
strcat((char*)extstring,(char*)".tcp");
</code>


Just to change the extension, or is there something else I could use?

Thanx




The only programmers that are better than C programmers are those who code in 1's and 0's..... Smile | :)

Smile | :) Programm3r

AnswerRe: strncpy.... [modified] Pin
kakan16-Nov-06 2:07
professionalkakan16-Nov-06 2:07 
GeneralRe: strncpy.... Pin
toxcct16-Nov-06 2:19
toxcct16-Nov-06 2:19 
GeneralRe: strncpy.... Pin
kakan16-Nov-06 2:33
professionalkakan16-Nov-06 2:33 
GeneralRe: strncpy.... Pin
Programm3r16-Nov-06 3:03
Programm3r16-Nov-06 3:03 
GeneralRe: strncpy.... Pin
Programm3r16-Nov-06 3:01
Programm3r16-Nov-06 3:01 
GeneralRe: strncpy.... Pin
kakan16-Nov-06 4:21
professionalkakan16-Nov-06 4:21 
AnswerRe: strncpy [modified] Pin
prasad_som16-Nov-06 2:41
prasad_som16-Nov-06 2:41 
GeneralRe: strncpy.... Pin
toxcct16-Nov-06 2:58
toxcct16-Nov-06 2:58 
GeneralRe: strncpy.... Pin
prasad_som16-Nov-06 3:01
prasad_som16-Nov-06 3:01 
GeneralRe: strncpy.... Pin
toxcct16-Nov-06 3:09
toxcct16-Nov-06 3:09 
GeneralRe: strncpy.... Pin
Programm3r16-Nov-06 3:00
Programm3r16-Nov-06 3:00 
GeneralRe: strncpy.... Pin
prasad_som16-Nov-06 3:10
prasad_som16-Nov-06 3:10 
GeneralRe: strncpy.... Pin
Programm3r16-Nov-06 3:14
Programm3r16-Nov-06 3:14 
GeneralRe: strncpy.... Pin
David Crow16-Nov-06 4:03
David Crow16-Nov-06 4:03 
GeneralRe: strncpy.... Pin
prasad_som16-Nov-06 18:12
prasad_som16-Nov-06 18:12 
QuestionRe: strncpy.... Pin
David Crow16-Nov-06 4:04
David Crow16-Nov-06 4:04 
QuestionHow to read file in reverse order? Pin
ashokbngr16-Nov-06 1:21
ashokbngr16-Nov-06 1:21 

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.