Click here to Skip to main content
15,918,742 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralAdjusting SPDemo Pin
Spamdogg20-Mar-03 6:33
Spamdogg20-Mar-03 6:33 
Generalinstallation program for dial up networking Pin
Member 29826820-Mar-03 6:22
Member 29826820-Mar-03 6:22 
QuestionProgrammatically getting IE cipher strength? Pin
dandy7220-Mar-03 6:20
dandy7220-Mar-03 6:20 
Questionmemcpy or loop? Pin
pankajdaga20-Mar-03 6:19
pankajdaga20-Mar-03 6:19 
AnswerRe: memcpy or loop? Pin
Member 29826820-Mar-03 6:27
Member 29826820-Mar-03 6:27 
AnswerRe: memcpy or loop? Pin
Daniel Turini20-Mar-03 6:27
Daniel Turini20-Mar-03 6:27 
GeneralRe: memcpy or loop? Pin
pankajdaga20-Mar-03 7:06
pankajdaga20-Mar-03 7:06 
AnswerRe: memcpy or loop? Pin
dandy7220-Mar-03 6:28
dandy7220-Mar-03 6:28 
In all likelihood, memcpy is probably faster. A 'for' loop would invariably involve many, many invidual memory accesses (reads and writes) to various addresses. Just loading those addresses in registers for each loop iteration will be a lot slower than a raw memcpy.

However, you're not specifying what type of arrays you have...if they contain strings, structs, or anything using pointers, memcpy won't replicate the data being referenced; you'll only get copies of the pointers. In that case, if you then destroy the original array, your copy's pointers will now be pointing an invalid addresses.

GeneralRe: memcpy or loop? Pin
dandy7220-Mar-03 6:30
dandy7220-Mar-03 6:30 
AnswerRe: memcpy or loop? Pin
Chris Losinger20-Mar-03 7:09
professionalChris Losinger20-Mar-03 7:09 
GeneralRe: memcpy or loop? Pin
Tim Smith20-Mar-03 7:27
Tim Smith20-Mar-03 7:27 
GeneralRe: memcpy or loop? Pin
Chris Losinger20-Mar-03 8:02
professionalChris Losinger20-Mar-03 8:02 
GeneralRe: memcpy or loop? Pin
pankajdaga20-Mar-03 11:52
pankajdaga20-Mar-03 11:52 
GeneralGenerating hlp files Pin
RalfPeter20-Mar-03 6:11
RalfPeter20-Mar-03 6:11 
GeneralWord or WordViewer as a View in an application Pin
Archigal20-Mar-03 5:52
Archigal20-Mar-03 5:52 
GeneralChanging the view form... Pin
Anonymous20-Mar-03 5:42
Anonymous20-Mar-03 5:42 
GeneralRe: Changing the view form... Pin
Yuri Kreinin20-Mar-03 6:34
Yuri Kreinin20-Mar-03 6:34 
GeneralDynamic CEdit Pin
Dave_20-Mar-03 5:17
Dave_20-Mar-03 5:17 
GeneralRe: Dynamic CEdit Pin
Yuri Kreinin20-Mar-03 6:21
Yuri Kreinin20-Mar-03 6:21 
GeneralRe: Dynamic CEdit Pin
Dave_20-Mar-03 7:04
Dave_20-Mar-03 7:04 
GeneralRe: Dynamic CEdit Pin
Yuri Kreinin20-Mar-03 7:54
Yuri Kreinin20-Mar-03 7:54 
GeneralRe: Dynamic CEdit Pin
Dave_20-Mar-03 8:05
Dave_20-Mar-03 8:05 
Questionhow to create a new environment block Pin
programmesky20-Mar-03 5:12
programmesky20-Mar-03 5:12 
AnswerRe: how to create a new environment block Pin
Neville Franks20-Mar-03 9:45
Neville Franks20-Mar-03 9:45 
GeneralCRichEditView question... Pin
RobJones20-Mar-03 5:05
RobJones20-Mar-03 5:05 

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.