Code: Select all
int tourinfo::ChangeScene()
{
stringw tmpstring;
stringw tmpstring1;
if (weathershow)
{
//tmpstring = land[tourindex];
TopLabel->setText(land[tourindex].c_str());
//tmpstring = direction[tourindex];
DirLabel->setText(direction[tourindex].c_str());
tmpstring = L"1";
tmpstring1 = weather[tourindex][1];
tmpstring += L"°";
//WeatherLabel1->setText(weather[tourindex][1].c_str());
WeatherLabel1->setText(tmpstring.c_str());
//WeatherLabel1
tmpstring = L"облачность: ";
tmpstring += cloudiness[tourindex];
WeatherLabel2->setText(tmpstring.c_str());
tmpstring = pressure[tourindex];
tmpstring += L" mmHg, ";
tmpstring += relwet[tourindex];
tmpstring += L"%";
WeatherLabel3->setText(tmpstring.c_str());
tmpstring = L"скорость ветра: ";
tmpstring += wind[tourindex];
tmpstring += L" м/с";
WeatherLabel4->setText(tmpstring.c_str());
WeatherLabel4->setText(tmpstring.c_str());
//tmpstring = hotel[tourindex][0] + L", вылет: " + date[tourindex][0];
//if (hotel[tourindex][0] == " ") tmpstring = L" ";
//FlightLabel1->setText(tmpstring.c_str());
//tmpstring = days[tourindex][0] + L" дней, " + number[tourindex][0] + L", " + price[tourindex][0] + L" руб.";
//if (hotel[tourindex][0] == " ") tmpstring = L" ";
//FlightLabel2->setText(tmpstring.c_str());
}
return 1;
}
Unhandled exception at 0x10003a06 in Tour3DforWindows.exe: 0xC0000005: Access violation reading location 0x1b4f9855.
in this block of irrallocator:
Code: Select all
//! Very simple allocator implementation, containers using it can be used across dll boundaries
template<typename T>
class irrAllocator
{
public:
//! Destructor
virtual ~irrAllocator() {}
//! Allocate memory for an array of objects
T* allocate(size_t cnt)
{
return (T*)internal_new(cnt* sizeof(T));
}
//! Deallocate memory for an array of objects
void deallocate(T* ptr)
{
internal_delete(ptr);
}
//! Construct an element
void construct(T* ptr, const T&e)
{
new ((void*)ptr) T(e);
}
//! Destruct an element
void destruct(T* ptr)
{
ptr->~T();
}
protected:
virtual void* internal_new(size_t cnt)
{
[b] return operator new(cnt);[/b]
}
virtual void internal_delete(void* ptr)
{
operator delete(ptr);
}
};