Search:
Type: Posts; User: wolle
Search:
Search took 0.03 seconds; generated 21 minute(s) ago.
-
You have not explained what is wrong, but your code effectively shifts the input integer five times to the right and then extracts the rightmost bit. For example, given input 32, which has a binary...
-
August 12th, 2022, 09:15 AM
Great, and chances are you meet people who like to get together and code in C++.
Good luck!
-
August 11th, 2022, 09:08 AM
Most open source projects are online. However, in Zûrich, the ETH seems to organize in-person activities,
https://gdsc.community.dev/eth-zurich/
-
August 9th, 2022, 09:41 AM
I suggest you look at Python, Java/C# (essentially equivalent), and C++. All are well-established and modern. All support procedural, object-oriented, and functional programming. And all are very...
-
August 4th, 2022, 09:38 AM
Your best option probably is to team up with a good programmer. That is how many successful companies started - one with the vision and one with the know-how.
-
July 31st, 2022, 11:46 PM
Well, I should have tested my code but it was intended more as an illustration for a suggestion. Anyway, the GetValue function can be declared constexpr and noexcept to make it even better.
-
July 30th, 2022, 03:47 AM
It is possible to use 2kaud's approach (in #8) but in a way that reduces the size of B. That can be useful if A grows in the future but still holds numbers that are all powers of 2. The idea is to...
-
July 30th, 2022, 02:41 AM
If it is a general programming project, it is better to use C++, even if it is a small project. With C++, you have C at the baseline but gain the benefits of a modern language. You get a substantial...
-
There are C++ to Java conversion tools available on the internet. Some are for free.
-
It is decided by the OS. In the case of Windows, Microsoft says this,
https://docs.microsoft.com/en-us/windows/win32/procthread/multiple-processors
-
Are you sure? I could not spot a bug, so I ran your code with jverd's test set in #3 and the results are identical. It suggests your code is working. Still, it will not work with negative integers....
-
March 4th, 2022, 03:13 AM
Are you looking for an algorithm to develop or to play the game? It is an important distinction. I think the OP wanted an optimal playing strategy.
-
February 27th, 2022, 03:34 PM
Are you looking for a solution to the Gauss circle problem?
https://en.wikipedia.org/wiki/Gauss_circle_problem
https://mathworld.wolfram.com/GausssCircleProblem.html
-
February 27th, 2022, 02:51 PM
I would consider Python,
https://www.python.org/
It is the preferred language among people with no idea :), and there are many, as you can see here,
https://www.tiobe.com/tiobe-index/
...
-
February 19th, 2022, 01:33 PM
The inventor of the null reference, Tony Hoare, has publicly apologized for it. He calls it his billion-dollar mistake. See this Wikipedia entry (the first paragraph in the Apologies and retractions...
-
January 27th, 2022, 05:18 AM
Embedding usually means that something is made part of some larger structure. And since the term "method" is predominantly used in object orientation, the larger structures in question could be the...
-
January 6th, 2022, 05:12 PM
C++ has a standard library to handle complex numbers,
https://en.cppreference.com/w/cpp/numeric/complex
Say you have,
f(t) = exp^(j*omega*t)
Note that the imaginary unit j plays a role in...
-
January 4th, 2022, 04:44 AM
My code is logically the same as yours. If your code is wrong, so is mine. Your problem description indicates you have a working solution and now want help making your code become "neater".
-
December 31st, 2021, 01:18 PM
I do not know what you mean by neater, but this is another way of assigning values to devy and devx,
if (_num <= 3) {
devy = 1;
devx = _num - 2;
} else if (_num <= 6) {
devy = 0;...
-
December 16th, 2021, 03:52 AM
What is wrong with VS Code? It is considered one of the best. Maybe you did not download the Go extension. Why not give it another Go :)
https://code.visualstudio.com/docs/languages/go
Anyway,...
-
December 10th, 2021, 03:30 AM
Could you please explain what is wrong with the order of the matches in the examples you have presented?
I cannot see anything strange in particular. Or is it maybe, that those who play their...
-
December 4th, 2021, 08:34 AM
But, it only works if the function itself is executable at compile-time. If not, you still need to use an std::vector.
-
December 3rd, 2021, 11:58 AM
It will work (in this case) if the function is declared constexpr.
-
November 29th, 2021, 03:48 AM
In addition to my post #4.
Not all decimal numbers have a finite digital representation. This includes 0.1, which requires an infinite number of bits. So when you assign 0.1 to a single-precision...
-
November 29th, 2021, 12:23 AM
A single-precision FP has 6-7 significant decimal digits, and a double-precision FP has 15-18. A good rule is to consider the significant digits only. The range of significant digits in an FP starts...
|
Click Here to Expand Forum to Full Width
|