Click here to Skip to main content
15,881,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to insert char* to char array - WITHOUT using string Pin
Vaclav_16-Dec-17 4:52
Vaclav_16-Dec-17 4:52 
GeneralRe: How to insert char* to char array - WITHOUT using string Pin
PIEBALDconsult16-Dec-17 4:57
mvePIEBALDconsult16-Dec-17 4:57 
AnswerRe: How to insert char* to char array - WITHOUT using string Pin
Victor Nijegorodov16-Dec-17 5:06
Victor Nijegorodov16-Dec-17 5:06 
AnswerRe: How to insert char* to char array - WITHOUT using string Pin
leon de boer16-Dec-17 5:08
leon de boer16-Dec-17 5:08 
GeneralRe: How to insert char* to char array - WITHOUT using string Pin
Vaclav_16-Dec-17 10:43
Vaclav_16-Dec-17 10:43 
GeneralRe: How to insert char* to char array - WITHOUT using string Pin
Victor Nijegorodov16-Dec-17 21:31
Victor Nijegorodov16-Dec-17 21:31 
GeneralRe: How to insert char* to char array - WITHOUT using string Pin
Vaclav_20-Dec-17 7:25
Vaclav_20-Dec-17 7:25 
AnswerRe: How to insert char* to char array - WITHOUT using string Pin
jschell16-Dec-17 8:55
jschell16-Dec-17 8:55 
Vaclav_ wrote:
Any constructive help would be appreciated,


First since you are using C++ you should be using 'new'

Steps
1. Call the existing character array A. Call the data to insert S.
2. Determine the size of the NEW array that you need. Add A size plus size of S.
3. Use 'new' to create brand new character array using size from #1. Call this new array X.
4. Determine where you are going to insert the new data.
5. Copy from A into X up to the point where you want to insert
6. Copy all of S into X at the point where you STOPPED in #4
7. Copy the REMAINDER of A (what was left over in A from #4) into X at the point where you STOPPED in #6.

Result is now in X.
AnswerRe: How to insert char* to char array - WITHOUT using string Pin
Richard MacCutchan16-Dec-17 9:51
mveRichard MacCutchan16-Dec-17 9:51 
AnswerRe: How to insert char* to char array - WITHOUT using string Pin
Munchies_Matt20-Dec-17 3:47
Munchies_Matt20-Dec-17 3:47 
GeneralRe: How to insert char* to char array - WITHOUT using string Pin
Vaclav_20-Dec-17 7:31
Vaclav_20-Dec-17 7:31 
GeneralRe: How to insert char* to char array - WITHOUT using string Pin
Munchies_Matt20-Dec-17 21:53
Munchies_Matt20-Dec-17 21:53 
QuestionHow know if a window is above another Pin
Schehaider_Aymen15-Dec-17 5:46
Schehaider_Aymen15-Dec-17 5:46 
AnswerRe: How know if a window is above another Pin
Rick York15-Dec-17 6:09
mveRick York15-Dec-17 6:09 
AnswerRe: How know if a window is above another Pin
Victor Nijegorodov15-Dec-17 9:28
Victor Nijegorodov15-Dec-17 9:28 
GeneralRe: How know if a window is above another Pin
Schehaider_Aymen15-Dec-17 11:07
Schehaider_Aymen15-Dec-17 11:07 
GeneralRe: How know if a window is above another Pin
Richard Andrew x6416-Dec-17 3:15
professionalRichard Andrew x6416-Dec-17 3:15 
AnswerRe: How know if a window is above another Pin
leon de boer16-Dec-17 5:36
leon de boer16-Dec-17 5:36 
QuestionFrame or even Thread exception handler with _try _except/_catch() Pin
ForNow15-Dec-17 3:22
ForNow15-Dec-17 3:22 
QuestionHow to check session created or not in MySQL X DevApi A,k,a X Protocol. Pin
lynxpravoka14-Dec-17 12:49
lynxpravoka14-Dec-17 12:49 
AnswerRe: How to check session created or not in MySQL X DevApi A,k,a X Protocol. Pin
Jochen Arndt14-Dec-17 21:01
professionalJochen Arndt14-Dec-17 21:01 
GeneralRe: How to check session created or not in MySQL X DevApi A,k,a X Protocol. Pin
lynxpravoka15-Dec-17 2:34
lynxpravoka15-Dec-17 2:34 
GeneralRe: How to check session created or not in MySQL X DevApi A,k,a X Protocol. Pin
Jochen Arndt15-Dec-17 2:51
professionalJochen Arndt15-Dec-17 2:51 
QuestionC pre increment and post increment Pin
Anonygeeker13-Dec-17 23:27
Anonygeeker13-Dec-17 23:27 
AnswerRe: C pre increment and post increment Pin
Richard MacCutchan13-Dec-17 23:52
mveRichard MacCutchan13-Dec-17 23:52 

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.