Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Hey,i met a problem
Hey,i met a problem [message #47002] Wed, 19 October 2016 07:46 Go to previous message
foxsir is currently offline  foxsir
Messages: 1
Registered: October 2016
Junior Member
Hey,plz help me. i just copy this code from u++ official tutorial,it gave me some compile errors

17 error: no matching function for call to 'Upp::Bar::Add(const char [5],MyAppWindow::SubMenu(Upp::Bar&)::<lambda()>)'
21 error:'class Upp::Bar'has no member named 'Sub'
29 error:no matching function for call to'Upp::MenuBar::Set(MyAppWindow::MyAppWindow()::<lambda(Upp::Bar&) >)'


#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct MyAppWindow : TopWindow {
MenuBar menu;

void Exit() {
if(PromptOKCancel("Exit MyApp?"))
Break();
}

void SubMenu(Bar& bar) {
bar.Add("Exit", [=] { Exit(); });
}

void MainMenu(Bar& bar) {
bar.Sub("Menu", [=](Bar& bar) { SubMenu(bar); });
}

typedef MyAppWindow CLASSNAME;

MyAppWindow() {
Title("My application with menu").Sizeable();
AddFrame(menu);
menu.Set([=](Bar& bar) { MainMenu(bar); });
}
};

GUI_APP_MAIN
{
MyAppWindow app;
app.Run();
}

my email is foxsir2016@163.com
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Hey,MyImages::MyImage() problem
Next Topic: not wanting to pick all members of user type
Goto Forum:
  


Current Time: Sat May 04 14:11:45 CEST 2024

Total time taken to generate the page: 0.02184 seconds