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

Search:

Type: Posts; User: potatoCode

Page 1 of 34 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    11
    Views
    1,342

    Re: Class Design

    no it doesn't
    a type trait class is a tracer and tracing something works best decoupled from what it's supposed to trace or encapsulated for a single purpose. in term of class design, the only...
  2. Replies
    13
    Views
    2,222

    Re: Multiple variables with cin

    if you don't know what indicates the end of the input, your program won't either now won't it?
  3. Replies
    11
    Views
    1,342

    Re: Class Design

    the first one is a big no no and the second doesn't make sense.

    Windows is Message-driven, with that in mind pick one that best suit your needs
    Design Patterns
  4. Replies
    24
    Views
    2,039

    Re: 3D array memory allocation dimensions

    If the array doesn't have to be a tree, then here is an example of a simple dynamic multiarray of any length

    #include <iostream>
    #include <algorithm>
    #include <functional>
    #include <numeric>...
  5. Replies
    10
    Views
    1,149

    Re: Function Macro definition problem

    In general, do/while(0) completes the function block and enforces the scope

    #define INT_SWAP(x, y) { int t = x; x = y; y = t; }
    If this macro is preceeded by an expression statement that requires...
  6. Replies
    17
    Views
    1,529

    Re: Differentiating inherited objects

    I assume this is all a part of the implementation detail and that such a rare need is for your own purpose only, otherwise not only you're forcing your user to know the guts of what is supposed to be...
  7. Replies
    24
    Views
    1,912

    Re: array-based list question

    There are benefits for having an array in a linked-list. For starters, it is much easier to manage pointers, implementing reference count such as weak reference that would be difficult without it,...
  8. Replies
    8
    Views
    871

    Re: Infinity or out of range?

    Yep.

    The zero you talked about when you said 1/0 is defined in math and the zero you used in your example code are not the same,
    with the latter being non-atomic producing implementation defined...
  9. Re: Can't figure out vector incompatible iterators problem

    When the element in the vector(unlike std::list or deque) is erased, all the references of the iterators starting from the position erased no longer point to the same memory block. The rationale...
  10. Replies
    8
    Views
    871

    Re: Infinity or out of range?

    And the names of such remarkable institutions of scholar is...?
    1/0 is undefined in algebraic term, the calculus theorem of the quotient ricocheting to the black hole as it is being eaten by another...
  11. Replies
    4
    Views
    1,651

    Re: semaphores & Concurrent Programming

    Hm, I don't know C--, but that doesn't look quite right to me. If all the conditions (access criteria) have their own keys and these keys are up for grasp for any client thread without any...
  12. Replies
    11
    Views
    963

    Re: Other implementation of singleton

    That's a bad idea. The best match-case was already provided by superbonzo, there's no need to break the fundamental rule of object instantiation for the sole purpose of passing two parameters to the...
  13. Replies
    12
    Views
    1,309

    Re: Need Help With The Array

    Nothing is easy, don't ever take things for granted.

    Next, properly indent the code as it still is a bit messy to read.

    Third, when you compile this code, what's the first error message you...
  14. Replies
    2
    Views
    463

    Re: Trees as Linked Lists

    What's that?

    well, you already know how to assign a pointer

    #include <iostream>

    namespace demo
    {
    std::ostream& os = std::cout;
  15. Replies
    7
    Views
    699

    Re: UNICODE question and help needed

    The ifdef approaches safeguards Your code from breaking, not the actual data your app is supposed to take care of. My first contact with the UNICODE concept was through the Charles Petzold book....
  16. Replies
    4
    Views
    1,464

    Re: std::array in constructor

    The initializer list is supposed to work but I don't know if gnu has implemented such an experimental feature or not. A constructor initializer sequence is still under debate, is it not? (somebody...
  17. Replies
    23
    Views
    1,554

    Re: Call Array Member in function Help

    I think you're being taught things backwards xD

    If I got you right, you want a recursive function to work with the array, and the class Node is capable of knowing whether it is sitting in the last...
  18. Replies
    7
    Views
    699

    Re: UNICODE question and help needed

    Unlikely.

    Each character is assigned a unique integral value, of which the representation is known as 'chracter mapping.' ASCII is usually a single byte(7 or 8 bit) whereas UNICODE is either 2 or...
  19. Replies
    23
    Views
    1,554

    Re: Call Array Member in function Help

    A thing to remember when you work with the built-in array is that the array decays to a pointer when passed to a function. Here's a little demo

    #include <iostream>

    // This is a POD
    struct...
  20. Re: Is there any difference between using {} and not using them?

    Haha. I meant nesting function CALLS
    But that 's' at the end of the word function was surely misleading
  21. Replies
    4
    Views
    629

    Re: Templates and Unresolved Externals

    and here's the link to Zuk's explaination.
    Why do I get linker errors when I use template friends?
  22. Re: Is there any difference between using {} and not using them?

    I agree with monarch_dodra on going with what is accepted at the working environment.

    There's one thing that I can't quite decide which way to go, i.e.

    // case 1
    template <typename Type>...
  23. Re: How do I specify types with exact byte lengths?

    struct myShortAndIntStruct
    {
    short int myShort : 16;
    int : 0; //Anonymous member of size 0: Forces alignment of next member
    long int myInt : 32;
    };
    To OP, as carefully...
  24. Replies
    11
    Views
    1,056

    Re: A Variable variable name?

    Looks like you got a wrong footing and digging at all the wrong places.
    Variable variables in PHP is a dynamic binding. Pointers drive the dynamic bindings in C++ so that's where you will likely...
  25. Replies
    2
    Views
    1,137

    Re: C++ Template Weird problem, please help

    First, this is not a template related problem.

    if-else is conditional statements for which the compiler must account for EVERY probabilities.
    The error message is saying that the compiler is...
Results 1 to 25 of 830
Page 1 of 34 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center