CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2005
    Posts
    16

    Smile Beginner C/C++ Question

    Hi,
    I am a beginner in C/C++ .
    I have been given a task in my school .

    the task is i have to write funtions to write and read from memory dircetly.

    like :

    void WriteToMemory(address , databuffer , sizeofdatabuffer)

    void ReadFromMemory(address ,databuffer ,sizeofdatabuffer)

    any gurus can help me on how to do this?

    note : i have to write data to particular address (starting address).

    thanks.

  2. #2
    Join Date
    Apr 1999
    Location
    Altrincham, England
    Posts
    4,470

    Re: Beginner C/C++ Question

    I'm not trying to be funny or unhelpful here, but we will only help with homework. By "help", I mean that you will have to demonstrate that you have made a start - show where you are up to, and then ask a specific question that is troubling you.

    We do this so that you can learn from the work you have been set. If we just gave you the answer, you wouldn't actually learn anything. So, make a start, ask a specific question, just don't expect to be fed the answer.
    Correct is better than fast. Simple is better than complex. Clear is better than cute. Safe is better than insecure.
    --
    Sutter and Alexandrescu, C++ Coding Standards

    Programs must be written for people to read, and only incidentally for machines to execute.

    --
    Harold Abelson and Gerald Jay Sussman

    The cheapest, fastest and most reliable components of a computer system are those that aren't there.
    -- Gordon Bell


  3. #3
    Ejaz's Avatar
    Ejaz is offline Elite Member Power Poster
    Join Date
    Jul 2002
    Location
    Lahore, Pakistan
    Posts
    4,211

    Re: Beginner C/C++ Question

    I can't believe that I'm doing the same thing twice in the same day, well here to go, have a look at How do I get other people to do my homework problem for me?. This is for your own good, someday you'll realize it.

  4. #4
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: Beginner C/C++ Question

    Are you guys trying to reinvent the wheel? memset, memcpy, memmove, etc. See Buffer-Manipulation Routines in MSDN.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured