POV-Ray : Newsgroups : povray.off-topic : My first C++ program : Re: My first C++ program Server Time
30 Sep 2024 19:30:50 EDT (-0400)
  Re: My first C++ program  
From: Orchid XP v8
Date: 19 Sep 2008 15:39:24
Message: <48d3ffec$1@news.povray.org>
Spot the mistake:

int foo(vector<int>& stack)
{
   int x = stack.back();
   stack.pop_back();
}

For reasons I can't begin to understand,

1. This doesn't produce any compile-time error.

2. This function always returns the value "2144912088".

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.