CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: wolle

Page 1 of 28 1 2 3 4

Search: Search took 0.03 seconds; generated 30 minute(s) ago.

  1. Re: New with C programming, question about a loop situation

    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...
  2. Replies
    4
    Views
    1,081

    Re: Open source in Zürich

    Great, and chances are you meet people who like to get together and code in C++.

    Good luck!
  3. Replies
    4
    Views
    1,081

    Re: Open source in Zürich

    Most open source projects are online. However, in Zûrich, the ETH seems to organize in-person activities,

    https://gdsc.community.dev/eth-zurich/
  4. Replies
    2
    Views
    211

    Re: Deciding which language to pursue ...

    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...
  5. Replies
    6
    Views
    486

    Re: programming question

    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.
  6. Thread: stl find

    by wolle
    Replies
    12
    Views
    631

    Re: stl find

    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.
  7. Thread: stl find

    by wolle
    Replies
    12
    Views
    631

    Re: stl find

    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...
  8. Replies
    3
    Views
    608

    Re: Built in Data Types Support in C and C++

    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...
  9. Replies
    15
    Views
    2,259

    Re: needs to convert C++ code to JAVA

    There are C++ to Java conversion tools available on the internet. Some are for free.
  10. Replies
    2
    Views
    291

    Re: Running an application on multiple CPUs

    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
  11. Replies
    3
    Views
    709

    Re: Palindrome Problem in C++

    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....
  12. Replies
    2
    Views
    3,700

    Re: Solving SameGame aka Clickomania

    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.
  13. Replies
    14
    Views
    6,488

    Re: Store all pixel from a circle in an array?

    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
  14. Replies
    5
    Views
    1,194

    Re: Which programming language can handle this

    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/
    ...
  15. Replies
    2
    Views
    1,347

    Re: Is it ok to use null checks?

    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...
  16. Replies
    2
    Views
    720

    Re: "Embedding a method" refactoring method

    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...
  17. Thread: complex signal

    by wolle
    Replies
    1
    Views
    1,083

    Re: complex signal

    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...
  18. Replies
    3
    Views
    660

    Re: Set to coordinates to centre of grid

    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".
  19. Replies
    3
    Views
    660

    Re: Set to coordinates to centre of grid

    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;...
  20. Replies
    1
    Views
    455

    Re: I'm new in Golang

    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,...
  21. Replies
    1
    Views
    1,090

    Re: Tournament Round robin to bracket

    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...
  22. Replies
    6
    Views
    2,522

    Re: Sudden problem with std::vector

    But, it only works if the function itself is executable at compile-time. If not, you still need to use an std::vector.
  23. Replies
    6
    Views
    2,522

    Re: Sudden problem with std::vector

    It will work (in this case) if the function is declared constexpr.
  24. Replies
    4
    Views
    1,541

    Re: Float point number simple arithmetic.

    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...
  25. Replies
    4
    Views
    1,541

    Re: Float point number simple arithmetic.

    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...
Results 1 to 25 of 691
Page 1 of 28 1 2 3 4





Click Here to Expand Forum to Full Width

Featured