Click to See Complete Forum and Search --> : Beginner C/C++ Question


rtos
February 9th, 2005, 05:14 AM
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.

Graham
February 9th, 2005, 06:27 AM
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.

Ejaz
February 9th, 2005, 06:38 AM
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? (http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.2). This is for your own good, someday you'll realize it.

cilu
February 9th, 2005, 06:57 AM
Are you guys trying to reinvent the wheel? memset, memcpy, memmove, etc. See Buffer-Manipulation Routines in MSDN.