Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: sf::String to std::string assert error  (Read 2095 times)

0 Members and 1 Guest are viewing this topic.

G-Rath

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
sf::String to std::string assert error
« on: July 11, 2014, 11:38:19 pm »
I'm rather new to C++ but not programming - I've done a fair bit of Java (making my own "game engine" of sorts), C# and Unrealscript (UDK). So I know a fair bit of the principles and the words.

In saying that, I think this might be a noob question, from what I've found on Google (more on that later). The issue I'm having is I'm getting an assert whenever I try and convert a sf::String to an std:string

Code: [Select]
Debug Assertion Failed!

Program: ...ML_StringAssert_TestCase\Debug\SFML_StringAssert_TestCase.exe
File: f:\dd\vctools\crt_bld\self_x86\crt\src\dbgheap.c
Line: 1424

Expression: _pFirstBlock == pHead

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)

From what I could find on Google, the issue could lie with using the incorrect binaries; either having debug mixed with release or vis versa. I believe I've done the SFML setup correctly, but I will have another look.

My OS is Windows 7 Ultimate x64 (application is 32-bit), I'm using Visual Studio 2013 and I've made a minimal example:

Code: [Select]
#include <SFML\Graphics.hpp>

int main()
{
sf::String test = "test";
std::string convert = test;

return 0;
}

Of course that would work fine if its an issue with my dll setup, and tbh after looking at it as I write, I think its likely my end as I would think this would be a rather big thing.

Still any help would be appreciated - like I said I'm new to C++, so its highly likely I've missed something big.

Thanks
« Last Edit: July 12, 2014, 12:09:49 am by G-Rath »

G-Rath

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: sf::String to std::string assert error
« Reply #1 on: July 12, 2014, 12:18:54 am »
After replacing SFML-2.1's binaries with the VS2013 RC ones, the error no longer occurs. Hence my bad - I was using the wrong binaries.

 

anything