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

Search:

Type: Posts; User: laserlight

Page 1 of 80 1 2 3 4

Search: Search took 0.19 seconds.

  1. Replies
    6
    Views
    158

    Re: Beginner- simple question

    You should be able to configure Visual Studio to pause the console screen for you. Unfortunately, I do not know how as it has always been the default for those times when I have used that IDE.
    ...
  2. Replies
    4
    Views
    153

    Re: Learner in C++

    Accelerated C++ follows the pedagogical recommendation outlined by Stroustrup in his essay on Learning Standard C++ as a New Language (PDF). This generally means an approach that favours the usage of...
  3. Replies
    4
    Views
    153

    Re: Learner in C++

    I recommend working through Accelerated C++.
  4. Re: TiXmlElement (tinyxml), looking for ways to get "Next" Child?

    You could always write:

    TiXmlElement* c = a->FirstChildElement()->NextSiblingElement();
  5. Thread: Arrays

    by laserlight
    Replies
    6
    Views
    318

    Re: Arrays

    Refer to: insertion sort
  6. Thread: Arrays

    by laserlight
    Replies
    6
    Views
    318

    Re: Arrays

    You can easily search the Web to find an answer for this. If you still have problems understanding the various explanations online, then you can come back here with your best attempt so that members...
  7. Replies
    6
    Views
    423

    Re: splitting a string into 2 strings c++

    There's a level of abstraction available here with find and substr that I think would be better than a lower level scanning of the string char by char to find those quotes and the substrings between...
  8. Replies
    11
    Views
    609

    Re: what did I do wrong

    Or you can move it to be near the top of the definition of zin1 instead.
  9. View Post

    razzle's suggestion is a general good practice recommendation, but I don't think that it will solve your problem here since an inclusion guard ensures that multiple inclusions of a header in a...
  10. Replies
    18
    Views
    3,915

    Re: Linear search using recursive function

    Even in 2006 I would have replaced a for loop, while loop or the use of recursion to implement the linear search here with a call to std::find... except that this was an exercise specifically to...
  11. Re: [NOOB QUESTION] Really large numbers in C++

    I recommend against this suggestion as getch is a non-standard function and conio.h is a non-standard header file. You can just run your program from a terminal window (or something along those...
  12. Thread: Return int

    by laserlight
    Replies
    7
    Views
    350

    Re: Return int

    We would normally say conversion rather than "cast" since it is implicit rather than explicit. Note that a compiler might complain about possible loss of data in such a conversion, so an explicit...
  13. Replies
    3
    Views
    394

    Re: "Invalid conversion from int to *int"

    You need to take the address:

    pNumber = &number;
  14. Replies
    2
    Views
    240

    Re: How to reduce the size of an object

    Yes, but if pointers are involved, then the pointers may point to memory that is not accounted for by sizeof.


    #1 and #4 have to do with the space for the code, which is likely to remain constant...
  15. Re: [NOOB QUESTION] Really large numbers in C++

    I think part of the fun (and certainly the learning experience) is to roll your own. You can always use established libraries like GMP to cross check your own implementation attempts.
  16. Re: Out-of-bounds access (ARRAY_VS_SINGLETON)

    You cannot store the result of sprintf call into the location pointed to by c in the first place because you only allocated a single char, initialising it with a value of 2. Perhaps you wanted to use...
  17. Replies
    6
    Views
    280

    Re: Minimal integer value rolled-up

    Hmm... I was expecting you to get a warning about an integer constant/literal being too large for int.


    The thing is, in the expression -2147483648, the integer literal is 2147483648. The unary...
  18. Replies
    6
    Views
    280

    Re: Minimal integer value rolled-up

    Check for yourself, e.g., #include <climits> and print INT_MIN and INT_MAX.


    Not necessarily true.

    Did you compile with warnings turned on at a high level? If so, what were the warnings, if...
  19. Re: Why is the CRTP used instead of virtual functions?

    The C++ standard does not require any particular scheme for the implementation of virtual functions, hence it cannot require any particular optimisation pertaining to such implementations. It could...
  20. Re: Why it give warning message, how will it remove

    I have answered this elsewhere.
  21. Replies
    10
    Views
    278

    Re: Why can't I have an ADT as a member?

    I already told you what you have to do in posr #2: You should store a (smart) pointer (or sometimes a reference) to this abstract base class instead.
  22. Replies
    10
    Views
    278

    Re: Why can't I have an ADT as a member?

    What is your current code and what is the error message?
  23. Replies
    10
    Views
    278

    Re: Why can't I have an ADT as a member?

    Your GetArgNum member function of Functor is not const-correct: it should be a const member function.
  24. Replies
    12
    Views
    331

    Re: Template question

    I see that you have this constructor in the Animation class template:

    AnimationKey(const std::vector<AnimationKey<T>>& _animKeys) {
    animKeys = _animKeys;
    }
    it should be Animation rather...
  25. Replies
    12
    Views
    331

    Re: Template question

    Don't assign NULL to anim when anim is a std::pair. It is pointless to call animKeys.clear() in the default constructor of the Animation class template.

    I suggest that you post the smallest and...
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center