LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-08-2014, 05:14 PM   #46
irajjs
Member
 
Registered: Jan 2010
Location: Karaj , Iran
Distribution: Mandriva 2012
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Smile Reply :


1-
Quote:
There is no reason to add headers unless you actually need them.
2-
Quote:
Although for example you could define "OK" such as
Quote:
Code:
#define OK = 1
3-
Quote:
Variables are critical parts of programming. They are really unavoidable.
1- My knowledge is not at the level that i can decide exactly which headers are needed , but just based on my general understanding and guessing i decide .
One example is that computer works on the mathematics and computing base so a math.h header (latest/best) possibly always will be useful.

2- I do-not/did-not define OK as 0 or 1 , i just defined that as the real meaning of it.
Here again i am going to be dragged into discussion ..but i have to answer just to answer , so i enter the discussion again :
I believe/understand that we are moving on the wrong basis , because :
Code:
OK != 0/1
True != 1/0
False != 0/1
but they have their real meanings as i mentioned before and you can see those meanings in any English dictionary
Here there is/was/has-been a problem :
Humans originally/mainly used their feet to move , but now/today they use wheels (cars, etc) , air-planes , ships , space-ships ...and far tomorrow ..maybe jump as in the movie named : jumper etc
So we have to use our feet (old definitions) while moving towards jumping !..etc
Most/nearly-all software are based on the old definitions , even computers bios and hardware are designed to work on the 0||1 (do-something or do-nothing) but it is the wrong basis !
I do not know how this must be , or , what exactly we should do , but i know that we should start moving forward while still using our feet !
3- variables are a basis for experimenting but not common in nature , but programming/programmers are mainly using variables (which are virtual and not real facts) ... as you said :
Quote:
they are unavoidable
..but they should not be basis for programming/computer-training ..
Sorry if i waste time
 
Old 02-10-2014, 12:35 PM   #47
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,879
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
This is a thread that has been going on since last September. Your original question seemed to be that you self-studied C programs, they were mostly all console based programs and you wanted to know how to make them run either from a GUI or present GUI based widgets as part of your programs.

This is possible, more likely from C++ when you use toolkits such as Qt (excellent, but rather difficult to set up), and FLTK (easier to set up, less well documented). And what I mean by this, is similar advice which others have related. The C language itself does not have functions which provide output widgets to interface with any operating system's window manager, rather each system type has library functions which allow a programmer to access and control GUI based widgets. To make it easier to use, toolkits like Qt or FLTK provide API functions to do this; however you have to install and use those toolkits as part of your process to make an executable function.

A recommendation is to try Qt and follow their documentation to do the equivalent of a GUI based hello world function, for Qt. I have a very old book, there's probably updates C++ GUI Programming with Qt, Blanchette & Summerfield. My version is 5 or 6 years old and based off of Qt4, I'm sure there's something newer and likely online. Within that book the first lesson is how to write hello world, but in GUI form.

As far as the question of include files, I do find that keeping to the minimum required include files is better versus having that list be non-necessarily long merely because you copy/paste as you create new programs. And how to tell what you need versus don't. Well, if you look at the manpage for common functions: printf(), scanf(), and so forth, at the top of the manpage it shows you the required include functions for that system library function.
 
Old 02-10-2014, 04:49 PM   #48
irajjs
Member
 
Registered: Jan 2010
Location: Karaj , Iran
Distribution: Mandriva 2012
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Smile I am trying to do it myself !

Quote:
Originally Posted by rtmistler View Post
....C++ GUI Programming with Qt,.....
Hi
I visited the Qt.software site , the only applicable result was their newspaper subscription ! because :
-I can not buy software ....no international credit cards here !
- I do not want to buy software ...i am self learning ,self ...i want to do any thing (in this regard) myself !
This much i know about Qt :
It seems that it is on the core of my OS ...and i have tried to use #qtconf a few times in the past
Maybe i can do more later..
Thank you for your helping attention

Last edited by irajjs; 02-11-2014 at 04:04 AM. Reason: changing two words which were not correct/fit
 
Old 02-11-2014, 07:25 AM   #49
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,879
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by irajjs View Post
-I can not buy software ....no international credit cards here !
- I do not want to buy software ...i am self learning ,self ...i want to do any thing (in this regard) myself !
Please stop being so pro-actively defensive. You absolutely can do this on your own as well as for free.

Qt has a free variation http://qt-project.org/downloads, and you will have to do a lot by yourself with that because after you download the .tar.gz file you then need to configure, make, and install the toolkit. After which you can actually use their toolkit and libraries. When you perform the configure, it asks you about what license you wish, you choose the free variation.

FLTK is also free. http://www.fltk.org/software.php

Another point to consider is that Qt and FLTK are both in source form; therefore you can read their source and learn from how they create graphics; should you desire to learn how to create graphics via your own programming.
 
Old 02-11-2014, 04:02 PM   #50
irajjs
Member
 
Registered: Jan 2010
Location: Karaj , Iran
Distribution: Mandriva 2012
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Smile An explanation and a question

Quote:
Originally Posted by rtmistler View Post
Please stop being so pro-actively defensive...
Hi
Let me explain about my being defensive first :
Once i downloaded a source code from a web site , then while trying to install i took a look at that source code ... the contents as much as i understood was an stepwise action like this :
- get data from system
- send data to ...site
- download ...
- install/make the program
- report to site
Now you tell me what is the difference between Linux free software and Windows/Microsoft related ones ?
I think if i want to do it this way Windows is all ready made , but controlled by others ..
Off course most possibly Qt site is not as that web site which i mentioned , although they tried to run scripts on related pages ...which i generally do not like this action , because i do not know about the contents of those scripts ... possibly they are trying to get data about the ip address and country , location .. etc .. but they can ask about it rather than just getting it directly by using an script .. and if they can not trust on me , then , how do i trust on them ?
Finally the question is that i could not find the link to the tar-gzip-32-source .. but the found name was : Qt 5.2 run !
Regards
 
Old 12-07-2016, 11:25 AM   #51
irajjs
Member
 
Registered: Jan 2010
Location: Karaj , Iran
Distribution: Mandriva 2012
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Still continuing! Just by myself!

More than 260 apps now! There has been some progress
I just wanted to inform to those who might be interested
I had to manage a cataract surgery
It is hard to work with this mobile device .. and i will never connect to Intetnet using my computer ..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
My newly bought hdd-s seem to have lower than expected rw-speed MasterOfTheWind Linux - Hardware 5 06-24-2008 09:32 AM
Problems with newly compiled kernel, not recognized as such and does not work WorkingClassHero Linux - Newbie 1 02-03-2008 12:19 PM
keyboard won't work with newly compiled kernel dr_zayus69 Linux - Hardware 10 06-05-2005 11:23 AM
Newly compiled kernel behaves as if it was the old one? grayFalcon Linux - Software 4 06-03-2004 04:52 AM
compiled Qt programs no longer work - libqt-mt.so.3 error BluePyre Linux - Software 1 05-30-2004 05:42 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration