Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: SourceForge.net <noreply@so...> - 2008-10-07 09:49:13
|
Bugs item #2151096, was opened at 2008-10-07 18:48 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=766244&aid=2151096&group_id=146814 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General code Group: 5.1 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Maxim Yanchenko (enerjazzer) Assigned to: Nobody/Anonymous (nobody) Summary: operator>>(void*&) doesn't work Initial Comment: Hi, it looks like operator>>(void*&) doesn't work (i.e. the default num_get::do_get(...,void*&) doesn't work). See this simple test: #include <iostream> #include <sstream> #include <stdio.h> int main() { int q=5; void *x1=&q, *x2=0, *x3=0; std::cerr << "x1: " << x1 << std::endl; std::cerr << "x2: " << x2 << std::endl; std::stringstream ss; ss << x1; ss >> x2; std::cerr << "x2: " << x2 << std::endl; char sss[256] = ""; fprintf(stderr, "x1 = %p\n", x1); fprintf(stderr, "x3 = %p\n", x3); sprintf(sss, "%p", x1); sscanf(sss, "%p", &x3); fprintf(stderr, "x3 = %p\n", x3); } compiling with gcc 3.4.6. output with gcc standard library: x1: 0x7fbffff11c x2: 0 x2: 0x7fbffff11c x1 = 0x7fbffff11c x3 = (nil) x3 = 0x7fbffff11c output with STLPort 5.1.5: x1: 0x0000007fbffff11c x2: 000000000000000000 x2: 000000000000000000 x1 = 0x7fbffff11c x3 = (nil) x3 = 0x7fbffff11c same locale settings. As you can see, STLPort fails to load a pointer. According to the Standard, it should work both ways as printf/scanf's %p, which is two-way working. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=766244&aid=2151096&group_id=146814 |