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

Search:

Type: Posts; User: TheRogue

Page 1 of 17 1 2 3 4

Search: Search took 0.23 seconds.

  1. Replies
    13
    Views
    1,390

    Re: sorting on the basis of datetime

    Have you thought of using the string comparison operators?
  2. Replies
    8
    Views
    801

    Re: c++ no virtual function found on table

    Yup :)
    If they get destroyed, then anything pointing to them will now be invalid.
  3. Replies
    8
    Views
    801

    Re: c++ no virtual function found on table

    TColl::TColl ()
    {

    _TOccV<DBE> *p;

    TOcc1 s1;
    p = &s1;
    _list.push_back(p);

    TOcc2 s2;
  4. Replies
    5
    Views
    806

    Re: virtual functions

    Its because you are trying to instantiate an object of type A.
    A is an abstract class, so cannot be instantiated.
  5. Re: [Discussion] Modifying a class' behaviour - inheritance pitfalls

    What about making Fast_String contain String instead, even going so far as to use pimpl ?
    All changes would then be via calls to Fast_String and thus len could be maintained.
    edit: not strictly...
  6. Replies
    2
    Views
    3,542

    Re: Compiler complains about shobjidl.h

    Is the header that defines "ICommDlgBrowser2" included ?
  7. Re: Problem in printing characters by using class

    I would suggest you go with the string for all "strings".

    use #include <string> //string.h isn't a C++ header.

    then use std::string (string is part of the std namespace)

    std::string...
  8. Re: Automatically obtaining the address of another member of the same object

    Wouldn't it be easier to pass a reference to stuff into the object requiring access to stuff ?

    I think the address of a reference the same as the address of what it refers to - if so, would this...
  9. Replies
    6
    Views
    1,154

    Re: Erase with iterator

    Read up on erase.
  10. Replies
    8
    Views
    1,154

    Re: static in the class

    You still have two main() functions.
  11. Thread: Sign of int

    by TheRogue
    Replies
    10
    Views
    1,694

    Re: Sign of int

    3.9.1 lists "int" as one of the five standard signed integer types.
  12. Thread: Sign of int

    by TheRogue
    Replies
    10
    Views
    1,694

    Re: Sign of int

    I've seen compilers that offer "default char to unsigned" as an option, but I havent seen "int to unsigned".
  13. Replies
    2
    Views
    3,476

    Re: Linked list progam, HELP!

    You should probably read the "choice" before switching on it, rather than reading after you have switched.
  14. Re: accessing variable of a class without instantiating or using static keyword

    A Singleton is unique to a process.
    You need pay special attention if you have a multithreaded envirnoment, see the section Singleton_pattern - Implementation
  15. Re: accessing variable of a class without instantiating or using static keyword

    You should have a look at the Singleton Pattern.
  16. Replies
    3
    Views
    711

    Re: question about two dimensional arrays

    'O' 'n' 'e' '/0' == 4 * char
    'T' 'w' 'o' '/0' == 4 * char

    Each comma is separating an array of characters.


    could be written as


    char name[] = "Sam" ;
  17. Replies
    5
    Views
    897

    Re: Inheritance with static constraint

    Would something like this be what you're looking for ?



    template< typename T >
    class base {
    protected:
    static T the_data ;
    } ;
  18. Replies
    2
    Views
    5,321

    Re: uninitialized reference member

    References need to be initialised in the constructor for their containing class.
  19. Replies
    1
    Views
    1,156

    Re: WebBrowser Click

    if (URL_Mine->ReadyState == WebBrowserReadyState::Loaded) {
    if (URL_Mine->ReadyState == WebBrowserReadyState::Loading) {
    this->URL_Mine->Visible = false;
    } else {
    ...
  20. Replies
    11
    Views
    1,437

    Re: Beginner's question regarding arrays

    There are going to be many ways to do this :)

    I would suggest you change your cards from an int to a class that has a member variable indicating which player owns it.
    You would then only need one...
  21. Replies
    1
    Views
    561

    Re: i did not understand Ref

    Looks like Ref and ArrayRef are templates.
    The code is createing variables based on the indicated types.
  22. Replies
    3
    Views
    6,775

    Re: Difference btn atoi & strtol

    a quick google come up with this.
  23. Re: Why copy constructor of ostream class is private?

    It is made private so you can't copy it.

    As Lindley said, there is no sense in having two ostreams.
    What use would there be in having two items doing the same job ?
    How would they sort out which...
  24. Replies
    4
    Views
    612

    Re: simple constructor question

    Objects are constructed in the order they are declared, so could you do:


    Game() : computerPlayer(theBoard) {
    }


    Or alternatively, have an initialisation function that takes a Board ?
  25. Replies
    11
    Views
    1,198

    Re: Simple I/O question

    You might want to remove the cin.get() - its eating your first character.
Results 1 to 25 of 403
Page 1 of 17 1 2 3 4





Click Here to Expand Forum to Full Width

Featured