Mam problem dziwny problem. Ten kod kompiluje się i działa tylko w trybie Relase w Visual Studio:
class Klasa { public: Klasa() { } }; stack<Klasa*> getShortestPath() { stack<Klasa*> stos; return stos; }
W trybie Debug wywołanie getShortestPath wywala błąd w
return stos;
Błąd:
Unhandled exception at 0x772A2D37 (ntdll.dll) in SuperAStart.exe: 0xC0000005: Access violation reading location 0x6B5DEFE2.
W Code Blocks działa niezależnie od trybu kompilowania. Dlaczego?