HendersonTillman Posted August 23, 2019 Share Posted August 23, 2019 am trying to use messagebox() like msgbox(), but harder then I think. I have tried many variations online, but not actually show me the values int var1 = 10 int var2 = 20 I want to have the message box show the two values along with text explaining which number is showing sudocode showstring = 'Variable 1 ' & var1 & ' variable 2 ' & var2 messagebox(NULL, showstring) How do I go about doing this? Any links or code would be helpful - Thanks EDIT Update title to reflect that this is a function for C++ Link to comment Share on other sites More sharing options...
Danyfirex Posted August 24, 2019 Share Posted August 24, 2019 Hello. This should work. #ifndef UNICODE #define UNICODE #endif #include <iostream> #include<windows.h> using namespace std; int main() { int var1=10; int var2=20; std::wstring s = L"Var1 = " + std::to_wstring(var1) + L"\r\nVar2 = " + std::to_wstring(var2); MessageBox(NULL, s.c_str(),L"Title",MB_OK); return 0; } Saludos pixelsearch 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now