> I only have one source file, and I have the declaration at the top as you
> said. I'm a bit confused about your suggestion about the formal
> declaration being
>
> int songCounter =3D 0;
>
> What does the 3D mean? Sorry if this should be obvious, I'm somewhat new
> to programming.
Ah, that's just your email client and mine (Apple Mail in that case, Outlook
right now...) disagreeing about what the default encoding for the text is.
Something in the path between you and I thinks that the equals symbol "=" is a
reserved character and is attempting to escape it...
It's a fairly common problem, particularly if one (but not both) of the
participants is using Outlook, so you'll probably get to see it a lot!
Anyway, if it's just a single file that is involved, it should be trivial, no
headers need be involved at all!
Here's a little example fragment; try this, see if it works for you. It may
show what I think you need to be doing.
Though, since I am posting from Outlook, there is a very real chance all the
"=" signs will be messed up again!
If so a global search and replace to convert "=3D" into "=" might work...
---------------------------------------------------------------------------
// Compile with:
// fltk-config --compile test.cxx
//
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Value_Output.H>
// The global value to use...
static int global_int = 5;
static Fl_Double_Window *main_win=(Fl_Double_Window *)0;
static Fl_Value_Output *show_value=(Fl_Value_Output *)0;
static Fl_Button *dec_bt=(Fl_Button *)0;
static Fl_Button *inc_bt=(Fl_Button *)0;
static Fl_Button *exit_bt=(Fl_Button *)0;
static void cb_exit_bt(Fl_Button*, void*) {
main_win->hide();
}
static void cb_dec_bt(Fl_Button*, void*) {
// decrement the count
--global_int;
// show the updated value
show_value->value(global_int);
}
static void cb_inc_bt(Fl_Button*, void*) {
// increment the count
++global_int;
// show the updated value
show_value->value(global_int);
}
int main(int argc, char **argv) {
main_win = new Fl_Double_Window(502, 305, "Main Window");
main_win->begin();
show_value = new Fl_Value_Output(60, 22, 66, 38, "value:");
show_value->value(global_int);
dec_bt = new Fl_Button(50, 85, 64, 45, "@<");
dec_bt->callback((Fl_Callback*)cb_dec_bt);
inc_bt = new Fl_Button(115, 85, 64, 45, "@>");
inc_bt->callback((Fl_Callback*)cb_inc_bt);
exit_bt = new Fl_Button(427, 259, 64, 34, "Quit");
exit_bt->callback((Fl_Callback*)cb_exit_bt);
main_win->end();
main_win->show(argc, argv);
return Fl::run();
}
/* end of file */
SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14
3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk