I have made a program that randomly generates a street name. it worked fine as a console application. Now that I have learn't a bit about it I thought I would try turning it into a window application. I did this but when I try to put my char's and strings into a message box I get this error.
error C2664: 'MessageBoxA' : cannot convert parameter 2 from 'char' to 'LPCSTR'
here's the code
// Street Name - The aim of this is to generate plausable Street names
#include <iostream>
#include <windows.h>
#include "random.h"
#include <string>
#include <cstdlib>
#include <ctime>
#include <WCHAR.h>
using namespace std;
C1 is a variable of type char, but MessageBoxA() expects one of type char* (a pointer to char), and it expects that the char array pointed to by the pointer your provide has at least one element whose value is the null char (numeric value 0) that signals the end of the string.