[Dev-C++] Re: [fltk.general] Help with 1st fltk program
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Jason B. <jb...@os...> - 2004-01-08 18:11:12
|
i think you must explicitly include <FL/Fl_Double_Window.H>
On Thu, 8 Jan 2004, Maya wrote:
> This would be my first FLTK program and what a disaster....
> Can someone please give a hand?
>
>
> TIA
> ------ NewAccountDlg.H ------
> #ifndef NEW_ACCOUNT_DLG_H
> #define NEW_ACCOUNT_DLG_H
>
> #include <FL/Fl_Window.H>
>
> #include <string>
> namespace jme{
> class NewAccountDlg : public Fl_Double_Window{
> private:
>
> public:
> NewAccountDlg(in w, int h, const char* t);
> virtual ~NewAccountDlg();
> }; //NewAccount
> }
> #endif
> ------ NewAccountDlg.C ------
> #ifndef NEW_ACCOUNT_DLG_H
> #include "NewAccountDlg.H
> #endif
> jme::NewAccountDlg::NewAccountDlg(in w, int h, const char* t){
> int itmp0 = w;
> int itmp1 = h;
> std::string strtmp;
> strtmp = t;
> }
> jme::NewAccountDlg::~NewAccountDlg(){}
>
> ---- main.cpp------
> #include <FL/Fl.H>
> #include <FL/Fl_Window.H>
> #include <FL/Fl_Box.H>
> #include "NewAccountDlg.h"
>
> int
> main (int argc, char *argv[])
> {
> Fl_Window *window;
> Fl_Box *box;
>
> window = new Fl_Window (300, 180);
> box = new Fl_Box (20, 40, 260, 100, "Hello World!");
>
> //box->box (FL_UP_BOX);
> box->labelsize (36);
> box->labelfont (FL_BOLD+FL_ITALIC);
> box->labeltype (FL_SHADOW_LABEL);
> window->end ();
> window->show (argc, argv);
>
> return Fl::run();
> }
> ------ Error Message -----
> In file included from main.cpp:4:
> NewAccountDlg.H:9: parse error before `{' token
> NewAccountDlg.H:14: destructors must be member functions
> NewAccountDlg.H:16: parse error before `}' token
>
> make.exe: *** [main.o] Error 1
>
> --
>
> FYI
> http://www.astro.umd.edu/~marshall/abbrev.html
>
> E-Mail Policy
> http://www.vif.com/users/escalante/Email_Policy.html
>
> * You cannot exercise your power to a point of humiliation.
> - Jean Chretien
>
> * The media's the most powerful entity on earth. They have the
> power to make the innocent guilty and to make the guilty
> innocent, and that's power.
> - Malcom X
> * "Innocent until proven guilty", no... not in Canada!!
>
>
> _______________________________________________
> fltk mailing list
> fl...@ea...
> http://lists.easysw.com/mailman/listinfo/fltk
>
+--
|
| Jason Bryan
| Director of Software Development, Interface Lab
| Ohio Supercomputer Center
| 1224 Kinnear Rd
| Columbus, Ohio 43212
| (614) 292-1051
| www.osc.edu/Biomed
|
| Have you seen VolSuite?
| http://www.osc.edu/VolSuite
|
+--
|