passing a filename to main()
- From: "Mickael Drean" <mickael drean gmail com>
- To: gtkmm-list gnome org
- Subject: passing a filename to main()
- Date: Mon, 6 Mar 2006 17:14:01 +0100
Hi there,
I tried to specify a file to load to my application on startup but it didn't works. At that moment I tried to only show the name of the file specified.
Here is my code :
int main(int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
if (argc > 1)
{
char* inpname;
strcpy(inpname,argv[1]);
printf(inpname);
}
CMyApp App;
Gtk::Main::run(App);
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]