HI.......

I am getting a weired problem when using referencing a NodePtr ;
I am using OpenSG with Fltk. Due to the callback structure of Fltk , when I 
want to pass a NodePtr to the callback function, I have to pass void* instead.
For that, I am passing the "pointer to NodePtr " in the call, and in the 
function i am Dereferencing the "pointer to NodePtr " to get the original 
NodePtr.
But my program was crashing. So to test I did something like this.

    importedGeoN is of type NodePtr

    cout << "importedGeoN Before :  "<<  importedGeoN << "\n";
    void* vPtr = (void*)&importedGeoN;
    NodePtr* selNodePtr = (NodePtr*)vPtr;
    NodePtr selNode = (NodePtr)*selNodePtr;
    cout << "importedGeoN After  :  "<<  selNode << "\n";
    
OUTPUT : 
importedGeoN  Before :  NodePtr 0x0x7fffff8ec440:NodePtr(0x0x9b49b8)
importedGeoN After  :  NodePtr 0x0x7fffff8ec410:NodePtr(0x0x9b49b8)

Both values should have been the same.
Why there is a difference in both values????


Plz Help..........

-----Jaideep
       
---------------------------------
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to