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

Search:

Type: Posts; User: superbonzo

Page 1 of 53 1 2 3 4

Search: Search took 0.06 seconds.

  1. Re: Recursive function: take a non-negative integer and print each digit of that inte

    well, then I have to ask you what do you mean exactly by equivalent/different solutions. Note that the issue this thread is about ( well, at least concerning OReubens and tiliavirga debate ) has to...
  2. Re: Recursive function: take a non-negative integer and print each digit of that inte

    yep, and I was pointing out that you have'nt proved that an explicit stack is required in the OP case ( the fact that it's not tail recursive does not imply it , unless I'm missing something of...
  3. Re: Recursive function: take a non-negative integer and print each digit of that inte

    granted, an explicit stack is the most straightforward way of transforming a recursive solution to an interative solution, but I don't think it's "required" ( unless you consider any form of state an...
  4. Re: Recursive function: take a non-negative integer and print each digit of that inte

    consider the number "123456"

    123456 % 10 = 6
    123456 / 10 = 12345
    12345 % 10 = 5
    12345 / 10 = 1234
    1234 % 10 = 4
    1234 / 10 = 123
    ...
  5. Re: Find all sentences or consecutive sequence of sentences where min

    wait, do they mean that eol's can be in the middle of a sentence ? if yes, the inplace parsing can be further simplified by using a deque and char by char extraction ...
  6. Re: Find all sentences or consecutive sequence of sentences where min

    assuming this is c++ and we can use only the standard lib, something like ( off the top of my head, neither compiled nor tested ! )



    #include <string>
    #include <vector>
    #include <fstream>...
  7. Replies
    63
    Views
    2,906

    Re: Abstraction concept problem?

    unfortunately, I don't think so. The original issue was not just about the dangers of (raw) pointers, but rather their role in interface designs.

    I ( and probably OReubens ) claimed that values...
  8. Replies
    63
    Views
    2,906

    Re: Abstraction concept problem?

    sure you can ( of course, your example won't compile because you can not bind a const reference to a non-const reference ) with the caveat that either A or A's users must ensure that any access to...
  9. Replies
    4
    Views
    413

    Re: a question regarding to std vector

    FYI, c++11 added std::any_of to replace the more verbose std::find_if() != .end()
  10. Re: C++ Acessing Virtual Functions of Custom Exception Class from Catch Statement

    uhm, there's a lot of confusion in there ...

    consider this code



    struct A{ void foo(){} };

    int main()
    {
  11. Re: C++ Acessing Virtual Functions of Custom Exception Class from Catch Statement

    typically, you throw by value and catch by (const)reference:



    void B::calculate()
    {
    try
    {
    if( cin >> a && cin >> b )
    {
  12. Replies
    63
    Views
    2,906

    Re: Abstraction concept problem?

    yep, the original discussion ( and my reply ) was about pointers rather than reference semantics, it looks like tilavirga uses the two interchangeably ...

    anyway



    I disagree, for two...
  13. Replies
    63
    Views
    2,906

    Re: Abstraction concept problem?

    Congratulations!!! You've just won the Dogmatic Statement of the Month competition. :) ( July edition )

    >> None is more evil than the other

    this is hardly believable; references carry more...
  14. Replies
    63
    Views
    2,906

    Re: Abstraction concept problem?

    historically, pointers mostly meant "mutable references"; nowadays, (smart)pointers should strictly means "ownership". An interface that use smart pointers to pass ownership of dependencies around is...
  15. Re: Algorithm Help - Statistical Relativity

    how is the score computed ?
    what's the final result ? ie, the full n*(n+1)/2 entries matrix of scores ? a top-ten for a given entry ? etc ... ?
  16. Replies
    10
    Views
    649

    Re: Implementig a hot-reload system

    off the top of my head, alternative solutions could be

    1) write a plugin for an existing 3d editor ( I'm personally in love with 3dstudio max and it's perfect for this purpose, but it's costly ......
  17. Re: Is it possible to add to (i.e. extend) a std::stringstream ?

    yep, stringstream does not "append" by default when its string buffer is not empty. You can

    1) in c++11, open in append mode



    std::stringstream whatever("initialize, ",...
  18. Re: Runtime error R6025 - pure virtual function call

    wait, I misread your post, the error happens in vs2013 ( and not in vs2010 as I assumed in my previous post, sorry ), but unfortunately I don't have a copy of vs2013 to test with at the moment.
    ...
  19. Re: Runtime error R6025 - pure virtual function call

    the std::locale/std::codecvt_utf16 relevant source code ...



    anyway, I resurrected a copy of vs2010 and the program



    #include <fstream>
    #include <locale>
  20. Thread: 3d vector

    by superbonzo
    Replies
    11
    Views
    1,049

    Re: 3d vector

    via lightweight proxy objects, say:



    #include <iostream>

    template < typename T >
    struct Proxy
    {
    T& up_; // the previous level
  21. Replies
    15
    Views
    1,222

    Re: cross correlation

    now, premising that, friendly speaking, your code is really a mess :) ( my advice is to pick some good c++ book to get the basic )

    the "logic" seems correct at first sight, though it's strange...
  22. Re: Challange for you becomes a challenge for others! Help creating a code snippet:

    I'm not sure I follow you ... should the snippets be tricky and hard to "solve" ? or should they convey some dangerous practice in a simple and concise way ?

    BTW,



    uhm, standard wise, null...
  23. Replies
    15
    Views
    1,222

    Re: cross correlation

    performance aside, strictly speaking there's no need of working in the frequency domain, simple cross correlation should work in time domain too for not too complex scenarios ( like the OP case, to...
  24. Re: Runtime error R6025 - pure virtual function call

    as far as I know, given that you cannot legally instantiate an object of abstract type, the only way of "legally" triggering that error ( undefined behaviour aside ) is when a base class subobject...
  25. Re: Challange for you becomes a challenge for others! Help creating a code snippet:

    it's not so easy; unfortunately the standard is not very explicit on when a null pointer dereference ( or more generally, an indirection of a pointer to an object with indeterminate value ) gives ub...
Results 1 to 25 of 1310
Page 1 of 53 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a Codeguru.com survey!


HTML5 Development Center