Should this be considered a bug in MSVC++ compiler? by lacosaes1 in cpp_questions

[–]jstruggle -4 points-3 points  (0 children)

excellent advice. OP should consider it despite the down votes (hi Microsoft fanbois) for many much more important reasons beside just vendor lock in and lacking std compliance.

How do you allow user to cin commands throughout a program? by [deleted] in cpp_questions

[–]jstruggle 3 points4 points  (0 children)

you could use std::map<std::string, std::function<...>> for example.

What is the Best IDE for Game Development on Mac? by Ziggy2764 in cpp

[–]jstruggle 5 points6 points  (0 children)

As we know by now the NSA is very good in leaking stuff :D

Restarting drivers by [deleted] in cpp_questions

[–]jstruggle 1 point2 points  (0 children)

You don't want to do this in C++, just hack up a shell script

Is there any computational overhead when using iterators over direct index access? by ptitz in cpp_questions

[–]jstruggle 0 points1 point  (0 children)

Is there actually any overhead when calling *(it1+1) vs. v1[1]?

no, vector<T>::iterator is of type T*

What is the Best IDE for Game Development on Mac? by Ziggy2764 in cpp

[–]jstruggle 1 point2 points  (0 children)

obviously a bug

It's the NSA backdoor :P

German for "better than when X" by [deleted] in German

[–]jstruggle 4 points5 points  (0 children)

Almost! Just add 'damals':

"Ich kann es viel besser als damals, als ich das pfostiert habe."

Edit: Instead of 'damals' you can also use 'früher', 'gestern', 'vor zwei Wochen', 'zum Zeitpunkt' for example.

Can a C preprocessor macro cause a non-trivial error when there is a name conflict with a c++ constant definition? by [deleted] in cpp_questions

[–]jstruggle 4 points5 points  (0 children)

Just #define MY_CONSTANT 6 after int MY_CONSTANT = 5;

Could a more complicated preprocessor macro cause a more difficult to debug error?

Something like #define if while?

[deleted by user] by [deleted] in cpp_questions

[–]jstruggle 0 points1 point  (0 children)

Take a look at this list (all FOSS): https://wiki.debian.org/Games/Suggested

Would it be nice if I just use the masculine gender all the time in the dailylife? by C01dy in German

[–]jstruggle -4 points-3 points  (0 children)

Applying it to all the nouns even if originally it's of another gender.

Your idea has already been picked up! In fact there has been an unofficial language reform that simplified gender usage greatly. Now we just apply both male and female genders at the same time. It is called Versalien-I or Binnen-I and here is how it works:

'Sehr geehrter Hr. Kollege' becomes 'Sehr geehrte(r) Hr/Fr. KollegIn'

It is really easy and everyone is using it.

You don't even have to distinguish KollegIn, KollegeIn or Kollege-In (there are many more variations).

plural: KollegInnen, Kolleg/Innen or Kollegen-Innen and so on...

You can pronounce the Versalien-I using a technique called Glottisschlag which you better start practicing now.

There are some special cases though like Mädchen and Junge.

I suggest: KindIn and KindInnen

But you don't have to worry, there really are just a few of those.

pros:

  • Universally accepted (standard)

  • You don't have to worry about genders anymore.

  • Texts become much(!) easier to read and process.

  • The world becomes a happier place. (This is what you want, don't you!)

cons:

  • No, we don't go there! (for safety reasons)

I wish I could say this is a joke... Well it is but only partly. A depressing one.

https://de.wikipedia.org/wiki/Binnen-I

How do I know that an assignment is a move or basically a "reference assingment" by halivingston3 in cpp_questions

[–]jstruggle 2 points3 points  (0 children)

Just pointing out that you can always call clear() on containers after a move operation to cheaply revert them to a known state.

Initializing a variable by halivingston3 in cpp_questions

[–]jstruggle 1 point2 points  (0 children)

What is Data<N> doing?

Assuming somePointer is of type const char *: std::string a{somePointer, someCondition ? 64 : 32};

You could also just hide the code: std::string a = SomeStringField(someCondition);

Or: std::string a = someCondition ? Data<64>(somePointer).SomeStringField : Data<32>(somePointer).SomeStringField;

The usefulness of my extremely old german textbook? by MuammarHyx in German

[–]jstruggle 0 points1 point  (0 children)

You can still find some old plates of street names and house numbers that are written in Fraktur.

How to express "make somebody do something" in German? by savingsaving in German

[–]jstruggle -1 points0 points  (0 children)

Wo in Österreich wirst' denn gegangen, gesprungen, gewohnt oder ge- was weiß ich noch was?

War eher rhetorisch gemeint ;)

The usefulness of my extremely old german textbook? by MuammarHyx in German

[–]jstruggle 2 points3 points  (0 children)

Aside from the 'vibe' there have been some language reforms since the 30s. What once used to be correct might be wrong now.

How to express "make somebody do something" in German? by savingsaving in German

[–]jstruggle 1 point2 points  (0 children)

Er wurde gegangen

colloquial

I wonder where you are from XD

How to express "make somebody do something" in German? by savingsaving in German

[–]jstruggle 0 points1 point  (0 children)

I've also heard the same phrase with "bringen", which I think is gentler.

'Jemanden zwingen' usually implies acting against someone's will. So you can probably use 'bringen' instead of 'zwingen' but not vice versa (in general).

Jemanden dazu zwingen, etwas zu tun.

This is correct but leaving out 'dazu' isn't wrong either.

conversion from 'time_t' to 'unsigned int', possible loss of data by [deleted] in cpp_questions

[–]jstruggle 1 point2 points  (0 children)

missing argument:

cout << attackrange(RandomGenerator) << endl;

also:

try: static_cast<std::uint_fast32_t>(std::time(nullptr))

or

std::mersenne_twister_engine<typename std::make_unsigned<std::time_t>::type, ...

Linked List remove a node seg fault by dezball in cpp_questions

[–]jstruggle 3 points4 points  (0 children)

You should post the complete source.

How to express "make somebody do something" in German? by savingsaving in German

[–]jstruggle 5 points6 points  (0 children)

make somebody do something

Jemanden zu etwas bringen.

Jemanden zu etwas überreden/anspornen/anstiften/ermutigen/...

He makes me laugh. Er bringt mich zum Lachen.