Search:
Type: Posts; User: wolle
Search:
Search took 0.03 seconds; generated 27 minute(s) ago.
-
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...
-
November 16th, 2021, 01:33 PM
That may speed things up on the CPU side, but you probably should do something to that effect on the GPU side too. Maybe by pooling the command buffers,
...
-
November 12th, 2021, 04:25 PM
I understand there may be company restrictions. But if you are free to choose, I recommend you update to the latest Visual Studio version and the latest C++ standard. With a reasonable delay, of...
-
November 12th, 2021, 02:53 PM
I agree with the previous posters, at least if you use C++ version 11 or later.
C++ 11 was a game-changer. Especially concurrency got a much-needed overhaul. Why should you not be able to use...
-
November 8th, 2021, 02:24 AM
I posted a solution strategy to this problem quite some time ago now,
https://forums.codeguru.com/showthread.php?562663-Birthday-is-no-problem&highlight=birthday+problem
Today, I can just...
-
November 2nd, 2021, 02:29 PM
Say you draw numbers at random from a range of equally likely numbers. At some point, all numbers have come up at least once. After that, all drawn numbers will be duplicates. With N numbers in the...
-
November 2nd, 2021, 03:11 AM
The C++ guidelines may not fit the bill perfectly, but it does demonstrate modern C++ usage (according to Stroustrup and Sutter, two prominent figures in the evolution of C++),
...
-
November 1st, 2021, 05:09 AM
Duplicity is a relative property between two entities. To compare the current entitity in a sequence with previous entities, one must store them somewhere. Unless, of course, duplicity is an...
-
November 1st, 2021, 02:34 AM
Then I suggest you use an std::unordered_set,
https://en.cppreference.com/w/cpp/container/unordered_set
You insert each new random integer into the unordered_set using the insert function. You...
|
Click Here to Expand Forum to Full Width
|