--- duongthaiha <[EMAIL PROTECTED]> wrote:

> Hi
> 
> I am trying to pass a object by reference with
> pointer into a function
> and using a method in that object. By seem to me it
> doesn't work.
> 
> The object i want to pass is Game and in Game have a
> function vector
> <char> getPuzzle ();
> 
> I pass game into the function
> 
> bool guess (Game* game){
> //do something here
> 
> vector <char> p = game->getPuzzle();
> //do something here too
> }
> 
> it will compile but when i run it it come back with
> the error message
> 
> This application has requested the Runtime to
> terminate it in an
> unusual way.
> Please contact the application's support team for
> more information.
> 
> Can you please tell me is that the correct way of
> using it? What
> should i do to avoid this kind of error
> I am quite new to C++ so please forgive me if the
> question is not
> appropriate.
> Thanks a lot
> 
> 
What does the code for 
vector <char> getPuzzle ();
look like?  The error may be there.

Ray


 
____________________________________________________________________________________
Never Miss an Email
Stay connected with Yahoo! Mail on your mobile.  Get started!
http://mobile.yahoo.com/services?promote=mail

Reply via email to