Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,750 members, 7,806,052 topics. Date: Tuesday, 23 April 2024 at 10:44 AM

Hope For C++ Newbies: Gui Toolkits - Programming (3) - Nairaland

Nairaland Forum / Science/Technology / Programming / Hope For C++ Newbies: Gui Toolkits (16735 Views)

How To Create A Simple Calculator Using Java Programing Language GUI / What Development Chain Do You Use For C++? (2) (3) (4)

(1) (2) (3) (4) (Reply) (Go Down)

Re: Hope For C++ Newbies: Gui Toolkits by BlueMagnificent(m): 10:31pm On Jan 09, 2016
This problem might be due to missing include directory path for wxWidgets, while creating the project through code:blocks hope you specified your wxWidgets directory when asked for the installation directory of wxWidgets.

You can post the error log here to give me a better understanding of what might be the issue
Re: Hope For C++ Newbies: Gui Toolkits by exxy(m): 3:34am On Jan 17, 2016
Hey, I am new to C++, i need all your help on how to start writing code and understand this language
Re: Hope For C++ Newbies: Gui Toolkits by codemarshal08(m): 12:42pm On Jan 17, 2016
exxy:
Hey, I am new to C++, i need all your help on how to start writing code and understand this language
Read Through this topic:
https://www.nairaland.com/2163116/want-learn-c-programming-language#31016123

come back for more Questions!
Re: Hope For C++ Newbies: Gui Toolkits by BlueMagnificent(m): 10:56pm On Jan 17, 2016
@exxy, First it will be good to know if you've had any programming background prior to this. But that is just by the way.
In order not to deviate from the focus of the thread you can visit this C++ helpline thread: https://www.nairaland.com/1820615/c-helpline after you must have gone through the link provided by codemarshal08. I and other fellows would be very glad to assist you in your C++ journey at the helpline thread smiley
Re: Hope For C++ Newbies: Gui Toolkits by exxy(m): 5:08pm On Jan 18, 2016
codemarshal08:

Read Through this topic:
https://www.nairaland.com/2163116/want-learn-c-programming-language#31016123

come back for more Questions!
Ok Bro
Re: Hope For C++ Newbies: Gui Toolkits by exxy(m): 5:12pm On Jan 18, 2016
BlueMagnificent:
@exxy, First it will be good to know if you've had any programming background prior to this. But that is just by the way.
In order not to deviate from the focus of the thread you can visit this C++ helpline thread: https://www.nairaland.com/1820615/c-helpline after you must have gone through the link provided by codemarshal08. I and other fellows would be very glad to assist you in your C++ journey at the helpline thread smiley
Ok Bro, i recently started tho. this is my first prog. language
Re: Hope For C++ Newbies: Gui Toolkits by exxy(m): 4:19am On Jan 29, 2016
My Ogas, make una help me check this assignment whether una fit write the code for C++

During the past decade ocean levels have been rising faster than in the past, an average of approximately 3.1 millimeters per year. Write a program that given the initial ocean level, will compute how much ocean levels are expected to rise during the next 20 years if they continue to rise at this rate. Display the answer in both centiments and inches. The final output should be the projected ocean level.
Re: Hope For C++ Newbies: Gui Toolkits by timtoday: 6:13am On Jan 29, 2016
exxy:
My Ogas, make una help me check this assignment whether una fit write the code for C++

During the past decade ocean levels have been rising faster than in the past, an average of approximately 3.1 millimeters per year. Write a program that given the initial ocean level, will compute how much ocean levels are expected to rise during the next 20 years if they continue to rise at this rate. Display the answer in both centiments and inches. The final output should be the projected ocean level.

How would you write it?
Before we start using the syntax of C++ to express our thought, the question is just an arithmetic conversion. if for the past decade (10) years, the ocean level has raised 3.1 mm / yr. What is the value now? Then, in the next 20 yrs what will it be at the same rate.
Do you remember 10mm make 1 cm songs we sang in primary school then grin, if you don't ask google, for how many mm makes 1 cm, then do the conversion, then how many cm makes 1 inch, or [ how many mm makes 1 inch ] then do the conversion.
If you can do that with pen and paper, the rest will be a piece of cake! That is the C++ programming syntax!
Re: Hope For C++ Newbies: Gui Toolkits by exxy(m): 7:38am On Jan 29, 2016
timtoday:


How would you write it?
Before we start using the syntax of C++ to express our thought, the question is just an arithmetic conversion. if for the past decade (10) years, the ocean level has raised 3.1 mm / yr. What is the value now? Then, in the next 20 yrs what will it be at the same rate.
Do you remember 10mm make 1 cm songs we sang in primary school then grin, if you don't ask google, for how many mm makes 1 cm, then do the conversion, then how many cm makes 1 inch, or [ how many mm makes 1 inch ] then do the conversion.
If you can do that with pen and paper, the rest will be a piece of cake! That is the C++ programming syntax!
ok Boss, let me get that done first
Re: Hope For C++ Newbies: Gui Toolkits by exxy(m): 8:59am On Jan 29, 2016
timtoday:


How would you write it?
Before we start using the syntax of C++ to express our thought, the question is just an arithmetic conversion. if for the past decade (10) years, the ocean level has raised 3.1 mm / yr. What is the value now? Then, in the next 20 yrs what will it be at the same rate.
Do you remember 10mm make 1 cm songs we sang in primary school then grin, if you don't ask google, for how many mm makes 1 cm, then do the conversion, then how many cm makes 1 inch, or [ how many mm makes 1 inch ] then do the conversion.
If you can do that with pen and paper, the rest will be a piece of cake! That is the C++ programming syntax!
Ok, How do i go with the syntax bro?
Re: Hope For C++ Newbies: Gui Toolkits by timtoday: 9:44am On Jan 29, 2016
exxy:

Ok, How do i go with the syntax bro?

What do you have written? I mean


#include <iostream>

int main() {

// your codes goes here
return 0;
}
Re: Hope For C++ Newbies: Gui Toolkits by exxy(m): 10:09am On Jan 29, 2016
timtoday:


What do you have written? I mean


#include <iostream>

int main() {

// your codes goes here
return 0;
}
Ok boss, but doing this assignment is looking hard tho
Re: Hope For C++ Newbies: Gui Toolkits by codemarshal08(m): 10:33am On Jan 29, 2016
Forget about syntax for now. Try to solve it on paper first.
Re: Hope For C++ Newbies: Gui Toolkits by timtoday: 10:56am On Jan 29, 2016
exxy:

Ok boss, but doing this assignment is looking hard tho
Please let us remain the
boss
thing. Thank you for that.
The assignment is really simple like I mentioned earlier. Am sure you have it solved on paper already?
Re: Hope For C++ Newbies: Gui Toolkits by exxy(m): 5:57pm On Jan 30, 2016
My Oga na so i come take run the program, @timtoday, u too much. and codemarshal08, i hail bro.
the thing be hard me small sha
based on say i just newly start to code. @timtoday, i go pm u bro.

// Emmanuel.cpp : Defines the entry point for the console application.
//ocean level now

#include <iostream>
using namespace std;
/*first represent variable of ocean level in millileter
second reprsent variable in milliter to centimeter
third represent variable in centimeter to inches
fourth represent variable in millimeter multiply by total number of years*/
int main()
{
double first;
double second;
double third;
double fourth;

cout<< "what is the new ocean level after 20 years? ";
cin>> first;
fourth = first + (3.1 * 20);

second = fourth * 0.1;

third = second / 2.54;

cout<< third <<" inches" <<endl;
cout<< second <<" centimeters" <<endl;

return 0;
}
/*
what is the new ocean level after 20 years? 62
inches4.88189
centimeter12.4
Press any key to continue . . .

what is the new ocean level after 20 years? 50
4.40945 inches
11.2 centimeters
Press any key to continue . . .
*/
Re: Hope For C++ Newbies: Gui Toolkits by timtoday: 9:19pm On Jan 30, 2016
exxy:
My Oga na so i come take run the program, @timtoday, u too much. and codemarshal08, i hail bro.
the thing be hard me small sha
based on say i just newly start to code. @timtoday, i go pm u bro.

// Emmanuel.cpp : Defines the entry point for the console application.
//ocean level now

#include <iostream>
using namespace std;
/*first represent variable of ocean level in millileter
second reprsent variable in milliter to centimeter
third represent variable in centimeter to inches
fourth represent variable in millimeter multiply by total number of years*/
int main()
{
double first;
double second;
double third;
double fourth;

cout<< "what is the new ocean level after 20 years? ";
cin>> first;
fourth = first + (3.1 * 20);

second = fourth * 0.1;

third = second / 2.54;

cout<< third <<" inches" <<endl;
cout<< second <<" centimeters" <<endl;

return 0;
}
/*
what is the new ocean level after 20 years? 62
inches4.88189
centimeter12.4
Press any key to continue . . .

what is the new ocean level after 20 years? 50
4.40945 inches
11.2 centimeters
Press any key to continue . . .
*/

Are you sure your calculation is right? Nice work on getting something going.

There are a number of thing, I think you can still work on though. Your variable should have meaningful name. Not first, second and the rest. Yes, I know you commented on that, but imagine writing a few hundred lines of codes, how do you remember which is which? Will you keep going back to the beginning of your program file? So names like: initial_ocean_level, ocean_level_mm, ocean_level_cm etc will be a lot better and reduce number of line of comments.

Secondly, the way you are using namespace is not a very good habit. That is for another day. But I think you need to know that up front. You are inputting all the std namespace in another file all together. Yes, is a common practice is not a good one. Am sure you will appreciate it when you are taught scope and namespace.

Lastly, check your calculations and your prompt string. I thought, what you are suppose to have is something like: "Input or Enter initial ocean level: " or somewhat according to the question. Just thinking aloud though. I have no seen your pm Ooo..
Re: Hope For C++ Newbies: Gui Toolkits by exxy(m): 11:08pm On Jan 30, 2016
timtoday:


Are you sure your calculation is right? Nice work on getting something going.

There are a number of thing, I think you can still work on though. Your variable should have meaningful name. Not first, second and the rest. Yes, I know you commented on that, but imagine writing a few hundred lines of codes, how do you remember which is which? Will you keep going back to the beginning of your program file? So names like: initial_ocean_level, ocean_level_mm, ocean_level_cm etc will be a lot better and reduce number of line of comments.

Secondly, the way you are using namespace is not a very good habit. That is for another day. But I think you need to know that up front. You are inputting all the std namespace in another file all together. Yes, is a common practice is not a good one. Am sure you will appreciate it when you are taught scope and namespace.

Lastly, check your calculations and your prompt string. I thought, what you are suppose to have is something like: "Input or Enter initial ocean level: " or somewhat according to the question. Just thinking aloud though. I have no seen your pm Ooo..
Ok bro, i will work on all this things. i pmed u alrd.
Re: Hope For C++ Newbies: Gui Toolkits by frankdupree: 6:03pm On Jan 31, 2016
I'm humbled by this thread..very informative, was happy to meet like minds, most especially peeps who code in c++..naija Boyz are good!

Re: Hope For C++ Newbies: Gui Toolkits by Nobody: 3:02pm On Apr 06, 2016
qt libraries and documentation is getting larger and crossplatform makes qt unique .

@bluemaginficent nice thread
Re: Hope For C++ Newbies: Gui Toolkits by GregoryOla: 6:12pm On Apr 06, 2016
Hello Bluemagnificent.

Can I ask for a direct contact please (it's about the issue of wxwidgets in code::blocks).

Really want to make the most out of this and I think I need a one-on-one guardianship.

I'll be most grateful in more ways than one.

Mine is goajala@yahoo.com, 0802 076 9881.
Re: Hope For C++ Newbies: Gui Toolkits by BlueMagnificent(m): 3:42am On Apr 08, 2016
GregoryOla:
Hello Bluemagnificent.

Can I ask for a direct contact please (it's about the issue of wxwidgets in code::blocks).

Really want to make the most out of this and I think I need a one-on-one guardianship.

I'll be most grateful in more ways than one.

Mine is goajala@yahoo.com, 0802 076 9881.




I'm always willing to help out as much as I can. Its usually better to post the issues here so we all can solve it, the reason being that someone else can benefit from the solution without even having to ask smiley .
Re: Hope For C++ Newbies: Gui Toolkits by danidee10(m): 5:23am On Apr 09, 2016
BlueMagnificent:



I'm always willing to help out as much as I can. Its usually better to post the issues here so we all can solve it, the reason being that someone else can benefit from the solution without even having to ask smiley .

I really love what you guys are doing here.....it's been long I found an interesting thread like this in the programming section

I'm not a C++ programmer but I use Qt with python (PyQt)...and it's really awesome and it's easier to work with cuz of python's elegant nature.

But the widgets, slots and methods are basically the same. Also there is a port of wxwidgets for python (Wxpython), thought PyQt is slowly overtaking it because of the introduction of Qt5 and the improvements made on Qml. This should be the same scenario in the C++ community (correct me if I'm wrong)

I'll try to chip in see how I can help others on this thread too smiley

Keep it up
Re: Hope For C++ Newbies: Gui Toolkits by BlueMagnificent(m): 11:15am On Apr 09, 2016
danidee10:

Keep it up

Thanks alot.
We are just trying to help out one another wink
Re: Hope For C++ Newbies: Gui Toolkits by GregoryOla: 7:26pm On Apr 10, 2016
@Bluemagnificent,

Please, here is what I get when I try to run one of the samples that come with the wxwidgets package. i.e. after trying to build and run the c++ file.

Re: Hope For C++ Newbies: Gui Toolkits by BlueMagnificent(m): 1:40am On Apr 11, 2016
@GregoryOla

I might need further specification of your build setup in order to properly figure out what went wrong. But what I can easily deduce for now is that wxWidgets "include" directory is not in your build setup include path. How did you setup the project? Did you use the wxWidgets template included with codeblocks?
Re: Hope For C++ Newbies: Gui Toolkits by GregoryOla: 4:41pm On Apr 25, 2016
Thanks BlueMagnificent.

(I'm just replying because your response wasn't displayed until I tried to make a "reply". Silly me)

Yes I used the wxWidgets template included with codeblocks. Then I accessed the sample file C++ file through the File Menu.

Please have you tried to run and build one of the samples that came with wxWidgets?

What should I be doing or what did I do wrong sir?
Re: Hope For C++ Newbies: Gui Toolkits by BlueMagnificent(m): 5:11pm On Apr 25, 2016
GregoryOla:
Yes I used the wxWidgets template included with codeblocks. Then I accessed the sample file C++ file through the File Menu.

Please have you tried to run and build one of the samples that came with wxWidgets?

What should I be doing or what did I do wrong sir?

I build and run those samples everytime I upgrade to a new wxWidgets release

I honestly have no idea what you did wrong, but for the benefit of doubt I will post a guild to building wxWidgets and using it with codeblocks on Microsoft Windows
Re: Hope For C++ Newbies: Gui Toolkits by GregoryOla: 8:48pm On Apr 25, 2016
Ok sir. Looking forward to that!
Re: Hope For C++ Newbies: Gui Toolkits by GregoryOla: 5:28pm On Apr 28, 2016
...
Re: Hope For C++ Newbies: Gui Toolkits by Stconvict(m): 12:45am On Apr 29, 2016
Qt is awesome.
I always get the feeling that wxWidget will eventually fall out of favor the way SDL is now.
If you want a long-term library support, I suggest going with Qt.
And Qt is not even hard as many people put it to be. Qt Creator makes it a mile easy to code GUI than tools for wxWidget.
Also, wxWidget was designed to produce the native look while in Qt coding custom interfaces is a delight.
There is also pyQt, for python devs.
And finally the documentation for Qt is adequate and reliable and the docs come with the application. wxWidget however has a lot of outdated docs lying around the internet.
Re: Hope For C++ Newbies: Gui Toolkits by BlueMagnificent(m): 4:17am On Apr 29, 2016
Stconvict:
Qt is awesome.
I always get the feeling that wxWidget will eventually fall out of favor the way SDL is now.
If you want a long-term library support, I suggest going with Qt.
And Qt is not even hard as many people put it to be. Qt Creator makes it a mile easy to code GUI than tools for wxWidget.
Also, wxWidget was designed to produce the native look while in Qt coding custom interfaces is a delight.
There is also pyQt, for python devs.
And finally the documentation for Qt is adequate and reliable and the docs come with the application. wxWidget however has a lot of outdated docs lying around the internet.

While I will agree with you to an extent, somethings are not entirely as you stated:
SDL out of favour? I don't think. First of all, SDL and Qt/wxWidgets are not in the same category. SDL is not a GUI toolkit but a multimedia hardware abstraction library. To quote from SDL site
Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D
I have some of my projects that heavily rely on the functions provided by SDL.

I started using wxWidgets roughly six years ago and as at then it looked like it would soon die out cheesy now I know I was wrong then. With the move to GitHub last year a whole lot of contribution opportunities have been opened up to people.

About documentation, Qt packs a good bundle of it, but wxWidgets docs are not old and lying around the internet. Current releases of wxWidgets also include doxy file for you to generate documentation using doxygen

You might be wondering with all these slight advantages that qt "seems" to have over wxWidgets, why would people not just jump to Qt and dump wxWidgets. Well, for those in the open source community, both users and developers, license matters alot, I know it might sound crazy but it can ruin a project if not taken seriously. I currently contribute to an opensource project where GPL and L-GPL libraries are forbidden. Some people feel ok going for wxWidgets because of the license it offers, others a comfortable with that of Qt.

At the end its win-win for everyone grin
Re: Hope For C++ Newbies: Gui Toolkits by Stconvict(m): 8:27pm On May 01, 2016
BlueMagnificent:


While I will agree with you to an extent, somethings are not entirely as you stated:
SDL out of favour? I don't think. First of all, SDL and Qt/wxWidgets are not in the same category. SDL is not a GUI toolkit but a multimedia hardware abstraction library.

I know what SDL is. I was only using it as an anology. The way many devs choose SFML over SDL. That 's how wxWidgets is to Qt.
Well maybe wxWidgets got updated recently but there is always this feeling I get when I'm using it like it some super ancient stuff waiting to die. tongue
The ease at which one can create custom interfaces in Qt pretty much beats all reasons for using wxWidgets for me. The signal and slot, the Qmake, the IDE and a lot of other goodies just makes C++ GUI dev on Qt a breeze. I believe wxWidgets is also nice, but I still don't see what it does that Qt framework doesn't do or better. And there's this incredible Qt tutorial by VoidRealms on Youtube that makes Qt very very approachable for beginners. But like always, a man to his tool. One should settle with what makes him comfy the most. wink

You might be wondering with all these slight advantages that qt "seems" to have over wxWidgets, why would people not just jump to Qt and dump wxWidgets. Well, for those in the open source community, both users and developers, license matters alot, I know it might sound crazy but it can ruin a project if not taken seriously. I currently contribute to an opensource project where GPL and L-GPL libraries are forbidden. Some people feel ok going for wxWidgets because of the license it offers, others a comfortable with that of Qt.
At the end its win-win for everyone grin
You call those mega awesome list of advantages "slight". grin
Qt also has an LGPL license. Believe me those are one of the first things I check for before using a library or framework. Don't wanna get caught in legal battles later.

(1) (2) (3) (4) (Reply)

Front-End Developer Or Back-End Developer: Which Job Title Has A Higher Salary? / LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! / Javascript With NodeJS

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 74
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.