I'm having problem with a char array.. here's my code.. nice and simple (I took out the unnecessary stuff), but this only gives a popup saying "a".. I've tried various other things, and keys[0] never works.. what's up with that?
Code:// Test.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <windows.h> #include <math.h> class hack { public: hack(char* hotkeys) { strcpy_s(keys,sizeof(keys),hotkeys); char* test = "a\0"; test[0] = keys[0]; MessageBox(0,test,"keys",MB_OK); }; ~hack() { } char keys[6]; }; // create an array of hacks... what they affect hack hacks[] = { hack("HP" ), hack("MH" ), hack("MP" ), hack("M" ), hack("A" ), hack("D" ), hack("P" ), hack("R" ), hack("S" ), hack("J" ), hack("RC" ), hack("YC" ), hack("HR" ), hack("MR" ) }; int _tmain(int argc, _TCHAR* argv[]) { return 0; }



LinkBack URL
About LinkBacks




And do not worry about the not reading my post in its entirety. I call it my illiterate blond manuver. It has served me well these many years.