curiosity of a noob c++ programmer

I just started learning c++ and I've learnt quite a lot, things like arrays, loops, structure, pointers etc..

buh all the codes/program only runs on command line, I know this is not all there is to c++, because I can't sell my app for a million bucks if it's only gonna run through command line!


Please How can we make our c++ programs run on other platforms! Because I heard we can develop apps and games with c++

C++ will already run on other platforms. I think your question is how to make a GUI? In that case, the answer is, exactly what do you want to make? Because there are different libraries with different strong and weak points. There is no all in one solution for developing graphics for all applications.
closed account (Dy7SLyTq)
buh all the codes/program only runs on command line, I know this is not all there is to c++, because I can't sell my app for a million bucks

there are plenty of programs that only run in the console such as g++ gdb or make

Please How can we make our c++ programs run on other platforms!

just write code that doesnt depend on *nix or windows only libraries/apis, like windows.h

if your looking for graphics/guis... sfml, sdl, ogre, allegro, opengl
Check out SFML or SDL or if its a simple application like a calculator , notepad , ect try Qt.
Check out SFML or SDL or if its a simple application like a calculator , notepad , ect try Qt.

For example if I wantu make a simple application like calculators, and I've already written the source codes!
How I'm I going to use qt,sfml or any of the above...

c++ will already run on other platforms. I think your question is how to make a GUI? In that case, the answer is, exactly what do you want to make? Because there are different libraries with different strong and weak points. There is no all in one solution for developing graphics for all applications.

Yeah I'm just curious to know how to make it gui, I know I still have other things to learn, but I just want to know what the future looks like

if your looking for graphics/guis... sfml, sdl, ogre, allegro, opengl

Are these names you mentioned are they just normal applications for making design to c++ programs or do they require their special codes
Thank you all
Last edited on
first of all i wouldn't recommend opengl as it is quite complex.

are they just normal applications for making design to c++ programs


i'm going to assume you meant GUI's. but the answer is no they aren't applications. they are libraries built in C/C++ and they add the ability to make graphics

do they require their special codes


i wouldn't say special code but they do add extra code to create windows and graphics.

for example here is the SFML (Version 2.0) code to make a window:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode (800,600), "Window");

    while(window.isOpen())
    {
        sf::Event Event;
        while(window.pollEvent(Event))
        {
            switch (Event.type)
            {
                case sf::Event::Closed:
                window.close();
                break;
            }
        }
        window.display();
    }
}



so it does add extra code but you just need to learn it like you would any c++ code.
Its basically just sub functions they provide for you to use. SFML has really good documentations and a few tutorials.
closed account (Dy7SLyTq)
first of all i wouldn't recommend opengl as it is quite complex. of course, but the trade off it worth it. you should never not recommend something because its too complex. if someone comes on here looking to learn c++ should we just recommend batch because c++ is complicated?
if you do go for sfml i would recommend the sfml coding made easy tutorials on youtube
Thanks all! You guys have been of great help!
Coding made easy sfml has 40 tutorials! Wow just when I thought I already know half of what I should know as a c++ programmer
closed account (Dy7SLyTq)
Wow just when I thought I already know half of what I should know as a c++ programmer
you still have a long way to go (we all do). it takes years to master a language
I believe to be considered a master of anything you have to have done it for 10,000 hours. So roughly it will take you 5 years to be a master of c++ if you do 40 hours a week.
Wow! I hope to be a master some day!
Please after the major coding, and creating a gui!
Is there any major stuff one needs to know in order to create a working application made with c++
logic
Please what is logic about!
Topic archived. No new replies allowed.