#ifdef _WIN32
#include <windows.h>
#include <iostream>
#include <vector>
#include <string>
#include <SDL/SDL.h>
#include <GL/gl.h>
#include <GL/glu.h>

using std::vector;

void error(const std::string& s) {
#ifdef _WIN32
	MessageBox(NULL, s.c_str(), "An error occurred", MB_ICONINFORMATION | MB_OK);
	std::cerr << s << std::endl;

That's my problem...

1>------ Build started: Project: glut_1, Configuration: Debug Win32 ------
1>  main.cpp
1>c:\users\konnor\documents\visual studio 2010\projects\glut_1\glut_1\main.cpp(15): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'LPCWSTR'
1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

And there's the error. Not sure what to do. Thanks in advance.

7 Years
Discussion Span
Last Post by Khoanyneosr

You working with a project where
#define UNICODE
is defined ,

If you want to continue with your UNICODE way, then I suggest you to typecast
your asci to unicode.

use any trick in here,

Alright, so don't really know what the differences between multi-byte code and unicode. How do i make it work? I looked over the last post and It just flew right over my head.
Thank you very much for the response though.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.