Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

myhanguk

@myhanguk
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Why doesn't this work?
    M myhanguk

    Hi... I'm having stupid problem with pointer to member functions. The following simple test program compiles, but crashes at run-time. Can anybody help me out here? class cTest{ public: double rand_mt(void){ return (1000.0); } double rand_cpp(void){ return (2000.0); } double (*cTest::nrand)(void); void init(int choice){ if (choice==1){ double (cTest::*nrand)() = &cTest::rand_cpp; } else { double (cTest::*nrand)() = &cTest::rand_mt; } } }; void main(){ cTest a; a.init(1); cout << a.nrand() << endl; } This simple program compiles, but crashes. It works fine if I don't use a class. Why? Thanks for your help, Niko

    Managed C++/CLI help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups