OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

> C++ Question
Capn_Fish
post May 1 2007, 05:00 PM
Post #1





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



I'm making a program for the Z that I need to take a variable and use it as part of a "system (xxxx)" command (or some other command to have the program call another command with args). How do I do that? Sorry if a) this is really obvious or cool.gif this question doesn't make sense. I have very little C++ knowledge, but am trying to learn.

Links to a solution would also be appreciated.

Thanks in advance.
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
pgas
post May 10 2007, 09:54 PM
Post #2





Group: Members
Posts: 1,099
Joined: 17-December 03
From: Athens, Greece
Member No.: 1,210



Depending on you background, you might want to try an easier
language first, say python, ruby....

C++ is probably the most complicated language out there (even if qt makes things easier, and probably gtkmm also).

Don't worry about performances, even the Zaurus is perfectly able to run python applications, and if your application is good or is something people are missing, they will use it anyway.
Go to the top of the page
 
+Quote Post
Meanie
post May 10 2007, 10:19 PM
Post #3





Group: Members
Posts: 2,808
Joined: 21-March 05
From: Sydney, Australia
Member No.: 6,686



QUOTE(pgas @ May 11 2007, 03:54 PM)
Depending on you background, you might want to try an easier
language first, say python, ruby....

C++ is probably the most complicated language out there (even if qt makes things easier, and probably gtkmm also).

Don't worry about performances, even the Zaurus is perfectly able to run python applications, and if your application is good or is something people are missing, they will use it anyway.
*


yeah. python, perl. they all run reasonably fast on the Z, so use the easiest one. python is already pre-installed on pdaXrom since the config tools use it so less stuff needs to be installed in order to run your apps, whereas if you write things in fltk or something else, you will need to install extra libs.

the main reason I choose to learn QT3 instead of python is the load speed. Since qt3 is just additional apis for c++, they are compiled binaries and qt3 libs already exist in pdaXrom (Package Manager and PPP tools for example are QT3) so nothing extra needs to be installed. python and perl are interpretors, you need to have those installed and each app written in those languages requires the interpretor loaded before it loads the app, so essentially more loading time and memory used. since qt3 is a compiled shared library, ie, .so, it only needs to be loaded once and can be shared amongst multiple qt apps.
hence if you want your apps to load very fast, use GTK+ ( C ), not gtkmm (C++) because C is slightly faster than C++ and gtk+ is already installed and loaded by most X apps. qt3 also loads pretty fast, but may be unloaded if no qt3 apps have been used for a while and because the ratio of gtk+ apps is much higher than qt3 apps, chances are the gtk+ libraries are never unloaded and always there...
perl and python apps which dont use gui are also quite fast to load, however, in order to use the GUI, those interpretors need to load a bridge, ie python gtk bindings which is pygtk.

there is not much difference in execution time for the binaries/scripts written in those languages, but the loading time of the interpretors/extra libraries adds additional time for the application to start hence, the perceived speed of the application is slower.

so i chose QT3 because it uses C++ which is Object Oriented instead of procedural like in C, and it loads faster because it is supported by a mutli-threaded shared libraries and already pre-installed on pdaXrom (qt-mt.so). also, the QT3 widget are quite easy to use and make it much easier than standard C/C++ or GTK+
Go to the top of the page
 
+Quote Post

Posts in this topic
Capn_Fish   C++ Question   May 1 2007, 05:00 PM
freizugheit   http://www.cprogramming.com/tips/showTip.p...count...   May 1 2007, 05:56 PM
Meanie   QUOTE(Capn_Fish @ May 2 2007, 11:00 AM)I...   May 1 2007, 06:19 PM
Capn_Fish   OK, I got everything sorted out (for the moment). ...   May 1 2007, 06:31 PM
Capn_Fish   New question: Is jumping in WAY over my head and t...   May 10 2007, 02:17 PM
Meanie   QUOTE(Capn_Fish @ May 11 2007, 08:17 AM)New q...   May 10 2007, 04:15 PM
Capn_Fish   QUOTE(Meanie @ May 10 2007, 07:15 PM)QUOTE(Ca...   May 10 2007, 05:35 PM
pgas   Depending on you background, you might want to try...   May 10 2007, 09:54 PM
Meanie   QUOTE(pgas @ May 11 2007, 03:54 PM)Depending ...   May 10 2007, 10:19 PM
pgas   I wonder if pyqt and python + gtk-server ( http://...   May 11 2007, 12:21 AM
Capn_Fish   Nah, I like C++, and I'll look into QT3. Than...   May 11 2007, 03:51 AM
Capn_Fish   You need -devel libs to compile QT3 on the Z, no? ...   May 15 2007, 09:51 AM
Capn_Fish   Is there any way to only use one string-like varia...   Jun 8 2007, 05:13 PM
Meanie   QUOTE(Capn_Fish @ Jun 9 2007, 11:13 AM)Is the...   Jun 8 2007, 06:50 PM
Capn_Fish   QUOTE(Meanie @ Jun 8 2007, 09:50 PM)QUOTE(Cap...   Jun 8 2007, 06:57 PM
Meanie   QUOTE(Capn_Fish @ Jun 9 2007, 12:57 PM)QUOTE(...   Jun 9 2007, 12:04 AM
Snappy   QUOTE(Capn_Fish @ Jun 9 2007, 10:57 AM)QUOTE(...   Jun 10 2007, 08:51 PM
pelrun   Use std::string wherever you can (and pass const/n...   Jun 10 2007, 05:53 AM
Capn_Fish   Slowly working around my problem, but I have anoth...   Jun 13 2007, 07:28 PM
Capn_Fish   Never mind, I worked around it.   Jun 14 2007, 07:40 AM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th April 2014 - 04:15 PM