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

Author Topic: Sfml c++, appcrash using the ToString function  (Read 1928 times)

0 Members and 1 Guest are viewing this topic.

Sebelius

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Sfml c++, appcrash using the ToString function
« on: December 12, 2012, 06:44:12 am »
I am using sfml 1.6 with code blocks 12.11.
I am fairly new to sfml, actually i just completed reading the tutorial covering sockets on: http://www.sfml-dev.org/tutorials/1.6/network-sockets.php. So i figured i'd try to use that knowledge to establish a communication between my school laptop and my stationary computer. I believe i might have set the interaction between code blocks and sfml wrong, because it does not work for some reason, and i know that the syntax is correct.

Can you please have a look at the error message i got from windows that i posted below, and maybe help me figure this out?

Source code:

#include <iostream>
#include <SFML/Network.hpp>
using namespace std;

int main()
{
    sf::IPAddress address = sf::IPAddress::LocalHost;
    string IP = address.ToString();
    return 0;
}
 
By the way, i can declare a variable of IPAddress type and compile without crash or error.


This is the error message i get from windows:

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name:   SFML Project.exe
  Application Version:   0.0.0.0
  Application Timestamp:   50c81674
  Fault Module Name:   sfml-network.dll
  Fault Module Version:   0.0.0.0
  Fault Module Timestamp:   4ba9064e
  Exception Code:   c0000005
  Exception Offset:   000051ed
  OS Version:   6.1.7601.2.1.0.256.1
  Locale ID:   1044
  Additional Information 1:   0a9e
  Additional Information 2:   0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:   0a9e
  Additional Information 4:   0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt
« Last Edit: December 12, 2012, 07:51:21 am by Sebelius »