Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 51 results for
shared-ptr
- Page 1
Boost shared ptr construction
Programming
Software Development
16 Years Ago
by Niner710
Hi , I am trying to use a Boost
shared
ptr
with a map template. I have a bunch of subclasses … to set the string "Iddq" to a boost
shared
pointer to subclass of TestSuperClass. Also have a problem when…
How do I set shared ptr to NULL
Programming
Software Development
15 Years Ago
by Niner710
Hi, I have a simple question on trying to set
shared
ptr
to NULL. I get an error(binary '=': no operator found which takes a right hand operand of type 'int') when I do this... [code] typedef std::tr1::shared_ptr<A> A_smrt; A_smrt = NULL; [/code] Why is this wrong?
Re: How do I set shared ptr to NULL
Programming
Software Development
15 Years Ago
by abhi_elementx
Actually there is no need to initialise it to NULL as we do in case of normal pointers. How ever, for more info, you can refer to the boost library docs. Cheers
Shared Memory in C
Programming
Software Development
17 Years Ago
by LightSystem
… I need to put a whole array in a
shared
memory file (using POSIX). I have no problems …way: int main(int argc, char* argv[]){ ... int *
ptr
; ... int fd=shm_open("/shm12",O_RDWR|O_CREAT,S_IRUSR|…S_IWUSR); ... ftruncate(fd,sizeof(int)); ...
ptr
=mmap(0,11*sizeof(int),PROT_READ|PROT_WRITE,MAP_SHARED,fd,0…
Re: Shared Memory in C
Programming
Software Development
17 Years Ago
by Ancient Dragon
[URL="http://www.cs.cf.ac.uk/Dave/C/node27.html"]Here [/URL]are some examples
Re: Shared Memory in C
Programming
Software Development
17 Years Ago
by LightSystem
Thank you that helped understand it a little better.
Re: design patterns using C++11
Programming
Software Development
11 Years Ago
by mike_2000_17
…it makes perfect sense. One of the required features of
shared
-
ptr
is to be able to share ownership of one object…), so, there needs to be mechanisms included within the
shared
-
ptr
implementation to keep track of the original raw-pointer type…an oddity, i.e., an artifact of the implementation of
shared
-
ptr
. And in any case, the existence of one way …
Re: design patterns using C++11
Programming
Software Development
11 Years Ago
by triumphost
…://stackoverflow.com/questions/4195691/to-use-
shared
-
ptr
-is-it-safe and http://stackoverflow.com/questions/3899790/
shared
-
ptr
-magic and even http://stackoverflow…
Re: shared_ptr and variadic template
Programming
Software Development
10 Years Ago
by mike_2000_17
…new to allocate an object to pass to the
shared
-
ptr
: return shared_ptr<T>(new T(std::…lt;Args>(args)...)); in your make-
shared
function. But looking at your
shared
-
ptr
class, there are obvious problems: template…grounds on which to improve your implementation. Implementing a
shared
-pointer class correctly is a very tricky task, …
Re: shared_ptr and variadic template
Programming
Software Development
10 Years Ago
by mike_2000_17
… as resolving issues like 1-8 above). For example, with
shared
-pointer, the "design" part is figuring out that… reference-count, that automatically deletes the pointer when the last
shared
-
ptr
is destroyed, that you might want it to be thread…
Re: shared_ptr and variadic template
Programming
Software Development
10 Years Ago
by mike_2000_17
We need more detail. You say you are using a custom version of
shared
-
ptr
, and the error seems to be in that custom class. So, we need to see that code, otherwise there is really no way to tell where the error might come from.
Change IP/Proxy
Programming
Software Development
9 Years Ago
by altjen
…("kernel32.dll")> _ Private
Shared
Function GetLastError() As Integer End Function Public …) Marshal.FreeHGlobal(opts(2).pszValue) Marshal.FreeCoTaskMem(
ptr
) Return (bReturn) End Function Public Function DisableProxy…
Smart Pointers
Programming
Software Development
12 Years Ago
by triumphost
…, Buffer, dwHeader); pFile = (char*)((DWORD)pFile + jmpSize); //Smart
ptr
.. :S I'm confused.. std::shared_ptr<char[]> pMemory…: How do I assign to my
ptr
? Is is supposed to be
shared
or unique? I know unique uses …only one can owner can have the raw
ptr
. So I used
shared
since that's what the equal sign …
Re: problem in my program in C( mikroC PRO V2.50)
Programming
Software Development
15 Years Ago
by bobyx
…,14,rp2val);// 96 1508 [B]Implicit conversion of int to
ptr
t1x[/B].c // Thanks, [QUOTE=0x69;1213827]Error messages are… must use semaphores (mutex) to lock
shared
resources between threads in such a way, that
shared
resource is accessed by only 1…
Re: problem in my program in C( mikroC PRO V2.50)
Programming
Software Development
15 Years Ago
by 0x69
… must use semaphores (mutex) to lock
shared
resources between threads in such a way, that
shared
resource is accessed by only 1…
Doubt in threads locking and unlocking..
Programming
Software Development
17 Years Ago
by Iqbal_h_a
… #1: fun2() { lock(); writestring(
ptr
, pconfig); unlock(); } bool writestring(char *
ptr
, char *pconfig) { //this code should not be
shared
across threads. One thread…
shmat at struct
Programming
Software Development
15 Years Ago
by mikabark
… can't solve it yet. Will you help me? Using
shared
memory,I have to copy structure to second program. But…; srand(time(NULL)); struct work_list work_ll[10]; struct work_list *
ptr
; struct work_list *ptr1;
ptr
= &work_ll[0]; ptr1 = &work_ll[0]; for…
GCC Fails to Recognize Parameters
Programming
1 Year Ago
by snah19
…-L$DJGPP_PREFIX3/lib3" \ --enable-debug \ --disable-
shared
\ --enable-static \ --disable-doc \ --disable-programs… static const char *urlcontext_to_name(void *
ptr
) { URLContext *h = (URLContext *)
ptr
; if (h->prot) return…
Re: Reverse a pointer to a set of integers
Programming
Software Development
16 Years Ago
by JpegUser
This is likely what happens in my loop . . temp[49] =
ptr
[51] temp[50] =
ptr
[50] temp[51] =
ptr
[49] . .
ptr
[49] is actually referring to temp[49] since they are
shared
pointees. So it's almost the same like temp[51] = temp[49] temp[52] = temp[48]
Sendmail error message cause by Reverse DNS mistake
Hardware and Software
Networking
17 Years Ago
by musemaker
… changed with my registrant. My external Host found that the
PTR
records had to be changed (and they probably had to… anyone here? I have root access (well, as far as
shared
virt hosting will allow) Thanks much in advance Kev from…
Re: problem accessing a deque of pointers
Programming
Software Development
10 Years Ago
by Moschops
…; i++ ) { *i ... ... Note that since SpriteList is a deque of
shared
pointers to sprite pointers, `*i` will give you a…
shared
pointer to a sprite pointer, so `(*(*i))` will give you …
using pointers on VB6
Programming
Software Development
1 Year Ago
by cambalinho
… VarPtrArray Lib "msvbvm60.dll" Alias "VarPtr" (
Ptr
() As Any) As Long Private Declare Sub CopyMemory Lib "… heres the code. some declarations can be different, so i
shared
what i use ;)
Re: Zlob DNSchanger
Hardware and Software
Information Security
15 Years Ago
by aharrold
…. . . : 86400 Data Length . . . . . : 4 Section . . . . . . . : Answer
PTR
Record . . . . . : localhost adunit.namiflow.com ---------------------------------------- Record Name . . . . . : adunit.namiflow.com…- C:\Program Files\Common Files\Macrovision
Shared
\FLEXnet Publisher\FNPLicensingService.exe O23 - Service…
Re: problem in threading, using pthread
Programming
Software Development
14 Years Ago
by nezachem
[CODE] pthread_create(&th[i], NULL, func_sort, (void*)arg1);[/CODE] You pass the same argument to all threads. Remember, that threads are running in the common address space, so a single copy of arg1 is
shared
among them. You need to create distinct individual arguments for each thread.
Re: pass files , as argument of main() in Python
Programming
Software Development
14 Years Ago
by TrustyTony
… *); int fclose(FILE *); unsigned fread(void *
ptr
, unsigned size, unsigned nobj, FILE *); unsigned fwrite(void *
ptr
, unsigned size, unsigned nobj, FILE *); void…
Re: Starting " C "
Programming
Software Development
18 Years Ago
by ~s.o.s~
…/unix-c-libraries.html"] Building And Using Static And
Shared
"C" Libraries [/URL] [URL="http://users.actcom…
Re: redirect output to memory
Programming
Software Development
16 Years Ago
by WaltP
… accessible by another program. There is a concept called [I]
shared
memory[/I] that you might look into, but you still…
Re: redirect output to memory
Programming
Software Development
16 Years Ago
by BITMAN2124
… all i/o. in my code, I want redirect to
shared
memory, so after I call CreateProcess and process exits I…
Re: make_shared()
Programming
Software Development
10 Years Ago
by vijayan121
… `std::shared_ptr<T>(new T(args...))` of a
shared
pointer from the raw pointer returned by a call to…
Re: my_config.h:506:16: error: multiple types in one declaration
Programming
Software Development
11 Years Ago
by Chrisadams
…] && strchr("\r\n\t\0x20", *
ptr
); \
ptr
--) \ *
ptr
= 0; \ errmsg= win_errormsg; \ } \ else \ errmsg… embedded library */ #undef HAVE_OPENSSL #undef HAVE_SMEM /* No
shared
memory */ #endif /* EMBEDDED_LIBRARY */ enum loglevel { ERROR_LEVEL…
1
2
Next
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC