Boost logo

Boost Users :

Subject: [Boost-users] boost managed shared memory: RUN FAILED
From: Olivier Austina (olivier.austina_at_[hidden])
Date: 2012-11-30 03:26:43


Hello,

I try to run an example from this online book(
http://en.highscore.de/cpp/boost/interprocesscommunication.html) and I got
"RUN FAILED (exit value 1, total time: 938ms) ". I am using Netbeans.
This is the example:

#include <boost/interprocess/managed_shared_memory.hpp>
#include <iostream>

int main()
{
  boost::interprocess::shared_memory_object::remove("Highscore");
  boost::interprocess::managed_shared_memory
managed_shm(boost::interprocess::open_or_create, "Highscore", 1024);
  int *i = managed_shm.construct<int>("Integer")(99);
  std::cout << *i << std::endl;
  std::pair<int*, std::size_t> p = managed_shm.find<int>("Integer");
  if (p.first)
    std::cout << *p.first << std::endl;
}

Thanks very much.

-- 
Regards
Austina


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net