can somebody explain the mechanism of the keyword "malloc"(allocating memory) in C++ by using a simple program code.........?

please explain this "malloc" using a simple programing code which contains a linked list,,,,,,,,,,

i think you are slowly going towards a homework assignment....first malloc then linked list now perhaps you would ask how to add nodes or delete them...:)


well, here's a link that might be some good to you....
http://www.cplusplus.com/reference/clibrary/cstdlib/malloc/


P.S: In C++ why would you like to use "malloc" anyway. You have better options like "new"

commented: Agree +28

thanks for your help..........that was very helpful.......

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.