Is C++ really best when used like C with more functions?

Is C++ really best when used like C with more functions?

Attached: portrait.jpg (500x335, 23K)

Other urls found in this thread:

github.com/vurtun/nuklear
github.com/lc-soft/LCUI
twitter.com/SFWRedditGifs

just use C lol

Just use C.

I do but it's like everyone uses C++ so I'm trying to be good at C++ too but it is confusing and upsetting me.

Attached: mikuspin.gif (108x91, 6K)

it's better when used like C with beefed up structs and STL

>duckduckgo "c gui library"
(I'm a beginner who wants to make my programs accessible to people who normally use a guided gui user interface. didn't know how else to search)
>results tell me to just give up and use c++

Attached: c7c.png (612x491, 106K)

Use Qt

other than fucking with UE4, i haven't had a reason to touch C++ in years

QT is c++ you fucknugget

Can use GTK but IIRC isn't Qt just C++?

tcl ttk

Some people like to pretend that users should interface with the computer only by text.

There's a little library called Nuklear you might want to take a look at. I haven't used it myself but it looks promising.

>Qt is c++
you can use C++ code in Qt but the framework extends c++ and in many cases breaks it, take it as a derivative of c++, it's due mainly for the signals and slots mechanism.

Attached: 1512408850534.png (645x614, 83K)

There's no real reason not to do it, aside from one or two constructs (bracketless sizeof and implicit void* -> thing* cast, think there's a few others) C++ can do everything C can do and just as fast.

As for whether or not it's best to use it like glorified C... Like most things it depends what you're trying to do.
For example if you have to process a lot of text using std::string or your own string class will make your life a lot easier than trying to implement the same thing as manipulations on character arrays. Likewise if you need to do a lot of vector math classes and operator overloading will be invaluable.
On the other hand if I was writing a kernel or some embedded software I might want absolutely no implicit code execution so it's very clear what's going on and I might want to manage my own memory very carefully to make the most of a restricted environment. In those situations I might

>what is xcb

If you're on windows use the win32 api.

C++ is best when you care about RAII (so, security) and portability.

it is best used like C with classes and templates and an obese stdlib

Just use Java

You should also make use of the whole class system.

Qt is Qt. It's not C++. It's like calling C++, C.

I'd rather stick my dick in a grinder

>c++ and in many cases breaks it, t
fucking brainlet
C++ code cannot break C++ code.
>doees not know about QML

well, its written in c++, if thats what you mean

Attached: c++.png (1620x774, 40K)

>C++ code cannot break C++ code.
oh well except
#define true false
#define false true
none of which is present in Qt headers.

>take it as a derivative of c++, it's due mainly for the signals and slots mechanism.

Signals and slots are just member functions.
Go read about Qt MOC.

If you're using C++ as C with complex structures you're doing it wrong.

Read stroustrup's book, and you'll understand why most of Sup Forums has no idea what C++ actually is.

>QT is c++
QT is pretty much its own language

Bjarne Stroustrup is your only safe resource for C++.

"juse use C" and "C++ is C with classes" are dangerous disinfo cryptojew memes

this is why windows isn't good anymore

Attached: sad-pep.jpg (640x480, 29K)

if c++ isn't complete shit why are all c++ compilers complete shit?

Attached: smug-pepe2[1].jpg (400x400, 42K)

The appx stuff is pretty good

github.com/vurtun/nuklear

I am a little confused by ofstream, ifstream and fstream.
Am I not supposed to use them in the main, but instead in functions as needed?

Otherwise I think it wouldn't make sense

OOP is designed to simplify programming. The fact that it's confusing you is a bad sign for your programming future.

C++ is best when used like C with templates, constexpr and namespaces.

Anything else is a mistake.

It doesn't simplify anything.

I see you didn't pay attention at school. At least you can get a job as a javascript qa for a little over minimum wagem

I've never read any Stroustrup, what is his approach to using C++?

Because they are either written by complete mongoloids or actually competent devs that have to mimic said mongoloids for extended compatibility.

t. never used ganoo compiler collection

What is a good oop book?

Attached: 1447566674216.png (374x347, 171K)

^This.
I'm not a gahnoo shill, but I have to give credit where credit is due. GCC is bretty good.

please don't use C++ like "C with more functions". this is exactly why everyone on Sup Forums tells you not to use C++ because they dont understand how to write modern code and they just write frankenstein shit like pic related and go "hurr durr C++ is too hard!!!"
go read up on how to do modern C++ and dont use anything from the C standard headers

Attached: dsfls.png (1280x721, 388K)

OOP is designed to allow brainlet to wrap their head around programming.

Modern C++ is fucking awful, barely any better than C++98.

Why? Scanf is god tier

Give up and use electron. desu native guis are a thing of the past and swing or javafx are total garbage.

>write one language in the style of another language
>then blame the language when you inevitably make a complete fucking mess

>dont use anything from the C standard headers
Fuck what do I do with cmath then?

>stl
>better
heh

>oop book

Just don't. The design pattern meme has died for some very good reasons.

cmath is part of the C++ standard library. math.h is the C library

Just use D lol

>Read stroustrup's book, and you'll understand why nobody has any idea what C++ actually is
Ftfy

Is there any different other than being in the std namespace?

>not using C headers to make your code a billion times faster while avoiding namespace bloat

not really. it uses templates and function overloading to work with arbitrary precision types, but otherwise i'm sure it just calls the math.h funcs. but that's not really the point i was trying to get across, the point is using std::string instead of char arrays

This retard right here.

>OOP is designed to simplify programming

No idea, I learned OOP in school.

t. Brainlets

>>duckduckgo "c gui library"
>>results tell me to just give up and use c++
>jewgle "c gui library"
>results tell me to just give up and use Go
gtk is a C library, you can also use the x11

>instead of namespace bloat, lets pollute the global namespace!
brilliant

Is it true that Code::blocks and Dev-C++ can't use paths with spaces 'cos MinGW doesn't allow it?

>development environment
>unable to handle spaces
That means that it was made by retards, is probably outdated, not worth mentioning and should be forgotten.

>t. Pajeet
Some mentally ill OOP cultist and first semesters that sniff too much SE farts like to think OOP simplifies programming.
However, studies revealed no increase of productivity or maintainability. In the best case.
For everyone non-brainlet it's actually just a semi half-assed way to implement dynamic dispatch.

>le studies
Back 2 leddit

>le talking out of your ass because you lack an argument for what you are parroting
Back 2 your S"E" Java class.

>That means that it was made by retards, is probably outdated, not worth mentioning and should be forgotten.
When talking about Dev-C++ and CodeBlocks, it's true.

D is the best "better C".

github.com/lc-soft/LCUI

OOP is a perfectly reasonable way to go about things much of the time. It's a victim of its own success though. Schools teach it as if it's the one true way when really it's just a hammer in a toolkit. Truly great languages enable both imperative and declarative approaches, and good programmers will use the right tool for the job.

Yeah this is true. One problem is that people try to stick with a single paradigm and end up trying to force a square into a circular hole. Even in the same project you should be using the best paradigm for whatever task you're trying to implement.