I am already familiar with java and C#.
Then now I'm trying to learn CPP and got one open source project to study.
First, the open source project didn't have a project to open in Eclipse or Visual Studio, only had some make files to build things. Wtf??? How can I even get the thing to run here?
Second, I opened some files on notepad++, WTF. I got no clue wtf is going on the file. There is so many stuff I have no clue what is, so complicated. I couldn't even find where the execution starts. Tried to find void main(), but no void main(). WTF?
Java and C# is so easy and simple and clean.
Is CPP really more difficult to lean or did I get one bad project that wasn't written to be friendly?
>>55741287
Yes, it's shittier than others.
Microsoft made everything overcomplicated. If you look at the source code of old C++ programs, they're a lot simpler. Regardless, it would be easier for you figure it out once you've gained enough experience in software development.
c++ is literally the worst language.
If you need performance, use C. If you need performance (not as much as C but still) and easier language, Go or Rust is the way to go in my opinion.
>>55741287
You should first make a simple program in cpp and try to make it compile on Linux and Windows. In your journey, you will understand a LOT of things that big open source are doing.
C++ does not have a standard framework like Java and C#. It does not impose OO, that's a choice.
It's 2016, stay away from C++ unless you have solid reason to use it.
>>55741401
kill yourself. you have no idea what C++ is or the usage of it. please stop writing any comment about any programming language.
>le use C xDD
enjoy your scalability. classical neckbeard with single person team, surprisingly has no idea how software development actually works.
>>55743791
Use fucking C++11 and strong libraries, you won't need anything else if you know what you are doing. Of course it doesn't have the same usage as C# or Java.
But performance & maintainability = C++11. You have no other option.
C++ is on another level. It's the only fast language where you can express concepts on a high level and keep your boilerplate under control. There's C, but it's crude and error-prone in comparison. And there's assembly, but that's even worse. C++ has no other competition, and never will.
>>55743993
This. Unless you destroy unix and change the paradigm, C++ will not have a competitor, assuming you're not programming embedded or OS.
>>55743906
>strong library
wtf does that even mean? strong to whom?
>maintainability = C++
do you even know what maintainable means?
>>55744132
boost
libev
qt
sdl
great libraries & APIs.
>>55743889
>enjoy your scalability.
Linux has almost 19 million lines of code and they're still doing fine.
There was a time in school where I was learning c++ and java at the same time. From the beginning it was easy to see that Java was somehow easier, even as a complete nub. "It just werks" is fucking right as far as Java is concerned. There's less flexibility with the syntax as compared to C++, and the whole pass by value thing only is a double edged sword. However, the rigid format of Java also allows for less mistakes and easier code creation.
>>55743993
>>55743906
>>55743889
>>55743791
ITT: people who only know one language.
>void main()
>>55744271
>Linux
>exploiting gullible users for testing imperative ad-hoc code to eventually sell it back in some hardware gadget, since 1990
ok
>>55741287
Read a fucking book nigger.
>>55744518
>int main(char *argv[], int argc)
pleb
>>55741287
>Is CPP on another level as a programming language?
yes, consider yourself lucky that you know java and C#.
Cpp is quite a world change if you're just getting into it. I recommend to start easier so you understand the main concepts. Try to make a simple program in C and then learning how to use makefiles and how object files, linking etc works.
C++ is on another level not because of the speed, but because of its pointers and ability to implement complex data structures (IMO). Boost for everything else.
>>55744167
> qt
> great
>>55741287
how about you work on an actual project instead of learning new languages for no good reason
>>55744556
>told and rekt
>damage control
ok
R-Rust?
>>55741401
C++ is for the libraries.
>>55741287
c++ = shit
learn JavaScript or Rust
>>55748585
>>55748671
lol
>no libraries
>no ides
>not backwards compatible with c
>no headers
>no separate compilation
>cant write unsafe programs
>your code gets controlled buy sjws
>interface based programming is inherently slower than real templates
c++ is the best at its own game, rust is not even a player
>>55748671
>JavaScript
>Programming
Choose one
>>55746698
> implying anything else is better
>>55748679
>no libraries
there's a decent amount of libraries for how young the language is, many bindings available for commonly used C libraries
>no ides
they're working on more than one i believe and either way vim/emacs/vscode etc are all pretty well supported for rust development
>not backwards compatible with c
so? it's a new language
>no headers
that's a good thing
>no separate compilation
what do you mean by this
>cant write unsafe programs
blatantly false https://doc.rust-lang.org/book/unsafe.html
>your code gets controlled buy sjws
ok kid xd
>interface based programming is inherently slower than real templates
idiomatic rust is faster than idiomatic c++
>>55748828
The Rust plugin for IDEA words pretty good
>>55748828
>they're working on it
That's a looter's excuse. Never trust anyone who makes you wait for something. Successful people only have two things to say about the work you give them: "I'll do it" and "it's done."
>>55748683
Javascript is really good and is the best language
You laugh at it now but in 10 years when 99.9% computers and servers will use nodeOS we'll see the clear winner
>>55748905
I'll forever associate JS with front end script shit
>>55748905
get a load of this coding buttcamp graduate
Best noob book to learn C++?
>>55749038
b-but i finished university
>>55749041
you still wanna learn it after this thread?
C++ is a good programming language.
You can pick the paradigm that fits the problem.
It is fast like C and safe like java.
It can be as verbose as java, but it is much more complete.
Stuff like operator overload makes java seem like unusable garbage compared to c++.
C++ is not that much more difficult.
I suggest that you start with using an IDE, QtCreator is great for new users.
the main function returns an int, but it might have arguments so it looks like this:int main(int argc, char* argv[]){
return 0;
}
This is so you can pass arguments to the applications and keep track of how many arguments with the argc.
It could also be a plugin or library you were looking at, then there would be no main function.
>>55749198
>operator overload
I love C++, but this is cancer.
>>55749198
>C++ is not that much more difficult.
it is, just read some real world C++ code like OP
>>55749259
operator overloads is essential if you do anything that uses math. It is easier to read and easier to write.
>>55749303
I have, obviously it takes more time to work on bigger projects, but you can still read it.
>>55741287
>can't program without a VS/Eclipse project all set up for him
Pajeet pls, GTFO back to C#
>>55741401
>everything C has
>also has classes, templates (yes they're ugly, but they're a necessary evil), a huge standard library
>is an actual language and not some meme language like Go or Rust
Why do people who put down C/C++ always put forth their shit-tier languages and ignore the fact that C++ is actually used and useful?
How bad is it that I never bothered to learn an IDE (not counting Dr Racket and one I created for a toy language)? The few times I've tried to open eclipse for a project it looked confusing and not really worth my time to figure out when I could be focused on programming. I figure much of the "real world" will have me working in IDEs
>>55741287
C++ is hard because you can do literally anything in it - embedded, low-level, functional, OOP...
It does have a few downsides but at the end of the day C++ is probably the language of choice for both academics and practical use.
>>55749492
As long as you can write cmake, I don't think anyone cares
C++ is for god tier only.
If you can't handle it go back to java or visual basic.
>>55748684
> Implying it is better because there is nothing better
>>55748648
This one.
C++ is very big, general purpose language. It can do everything, but in every domain there is atleast one language that is just better than c++. Except for gamedev.
>>55741287
It's faster than java. C# is a meme language.
>>55749950
you can learn both java and C# faster than you would just the basic c++ and then there's the stl monster
c++
>>55750378
c++ suck
>>55749138
Well, I have a program I want to write using an API in C++ so I don't have much choice.
>>55751107
this shall suffice
>>55751762
2/4
>>55751762
3/4
>>55751762
4/4
>C++ lambdas
>A LITERAL FUCKING BOX
truly the ugliest language of the C family
>>55751818
C++ lambdas are the fastest of any language available at the time. Stop complaining shitty programmer.
>>55749198
>C++ is not that much more difficult.template <template<typename...> class BoolFunc,
template<typename...> class StatTagFunc,
class... StatTagArgs>
struct tag_node_query
{
template<typename TheTagNode>
struct apply
{
using stat_tag = typename TheTagNode::tag;
using type = std::integral_constant
<
bool,
BoolFunc<
typename StatTagFunc<stat_tag>::type,
StatTagArgs...
>::value
>;
};
};
You're an idiot.
>>55751812
With this cheat sheets, some reading about shared_ptr and unique_ptr and you are good to go OP.
Remember to put header guards into headers. Otherwise you get compilation errors.#ifndef __MYFILENAME_H__
#define __MYFILENAME_H__
.... code
#endif
>>55751957
>undefined behavior
anon...
>>55741287
>Notepad++
I will never understand the people who use this thing for programming. I mean, I also have it installed because notepad.exe is too stupid to understand linebreaks, but I certainly don't edit anything with it.
>>55751950
This isn't even remotely normal C++ code
It's like posting the business card raytracer and using that to knock on C++
>>55751978
Sorry didn't know you were using Turbo C++.
>>55749931
>not using Rust for fearless concurrency in your gamedev
>>55751978
try #pragma once
>>55741287
Just realized it's called C++ because it's supposed to be the second version of C.
I'm a CS grad.
>>55751995
>I don't know C++
>>55752069
And C# is C++ ++ with the pluses stacked on top of each other
>>55741287
C++ tries to do everything, and do it more or less in a broken way just to keep the C syntax. Yet, it's not going away anytime soon.
>Within C++, there is a much smaller and cleaner language struggling to get out.
- Stroustrup, also adding that this language is neither Java nor C#
>>55751996
>>55752029
found the js cucks
>>55752029
Supported on MSVC, GCC and ICC but not standard.
>>55748905
On the contrary.
In 10 years PCs will be running either MacOS or Android.
>>55752084
fuck
>>55752197
You know, Android is just a different process scheduler and loader on top on Linux.
>>55752095
Pretty much that.
While C# tries to be both C++ and Java, yet still managed to be worst of both worlds.
>>55748905
Another blue pilled gulliber
>>55752084
in music it means half a note higher so like C 1.5
>>55752220
But it's a JVM.
Hell, it's closer to Solaris than it is to Linux.
>>55749463
>everything C has
Was 20 years ago.
>>55748828
rust is good, i agree
>>55752197
pc's running macos is a really good thing
>>55749259
>I want to type a function call every time I multiply two matrices
Nope. It doesn't make it more readable either.
how's c++ primer 5th edition?
>>55753195
Already old
>>55753339
What would you recommend then? PPP is fairly large... Primer looks better and I don't think I even need to be writing C++ 14 code anyway...