1 Oct
2009
1 Oct
'09
7:35 a.m.
manish4gupta wrote:
if(flag == 0) managed_shared_memory segment(create_only,MySharedMemory, 99989); else managed_shared_memory segment(open_only ,MySharedMemory);
Error message: Indexingtest.cpp:41: error: ‘segment’ was not declared in this scope
How can i overcome such pblm.
By reading a good book about C++ :-) You want to learn about scope. Then you have several options. Pointers are one, functions might be another (not sure if managed_shared_memory is copyable). If you go for pointers, familiarize yourself with shared_ptr. Smart pointers are your friends. Regards, Roland