My Professional Profile

I am Johnson Augustine Sr.Software Engineer and System Architect. I have 10 Yrs of hands on expertise in MVC 5 , Angular 5 , C# MVC Razor, WPF MVVM , Android , IOS Swift 3 , IOS11 MSSQL,MySQL Database,,PHP,C/C++/Visual C++/G++/QT++,Com,DirectX,Open CV,EMGU CV , embedded System Development , [Raspberry PI]. ,html,Javascript,Jquery,Ajax.CSS , Networking ,Cyber security, Ethical Hacking You can see my professional profile at Email :

Saturday, 18 May 2013

memcpy() in c++ Reference

memcpy() in c++ Reference

memcpy() is used to transfer a bulk data [Block of data or memory block ]means a number of bytes in to another location , We can use this function in both windows and linux to copy memory locations .

Syntax :  memcpy ( Destination,Source,Sizeof memory block );

/* memcpy example */
#include <stdio.h>
#include <string.h>

struct {
  char Address[40];
  int count;

int main ()
  char maddress[] = "Johnson";

  /* using memcpy to copy string: */
  memcpy ( obj.Address, maddress, strlen(maddress)+1 );
  obj.count= 4;

  /* using memcpy to copy structure: */
  memcpy ( &obj1, &obj, sizeof(obj) );

  printf ("copied" );

  return 0;

No comments:

Post a Comment

Note: only a member of this blog may post a comment.